Javadoc
This commit is contained in:
parent
1838ddb95d
commit
af2e296ff3
|
@ -33,9 +33,7 @@ import org.springframework.util.MultiValueMap;
|
||||||
* <pre class="code">
|
* <pre class="code">
|
||||||
*
|
*
|
||||||
* MultipartBodyBuilder builder = new MultipartBodyBuilder();
|
* MultipartBodyBuilder builder = new MultipartBodyBuilder();
|
||||||
* MultiValueMap<String, String> form = new LinkedMultiValueMap<>();
|
* builder.part("form field", "form value");
|
||||||
* form.add("form field", "form value");
|
|
||||||
* builder.part("form", form).header("Foo", "Bar");
|
|
||||||
*
|
*
|
||||||
* Resource image = new ClassPathResource("image.jpg");
|
* Resource image = new ClassPathResource("image.jpg");
|
||||||
* builder.part("image", image).header("Baz", "Qux");
|
* builder.part("image", image).header("Baz", "Qux");
|
||||||
|
|
|
@ -149,7 +149,9 @@ public interface RestOperations {
|
||||||
* the {@code Location} header. This header typically indicates where the new resource is stored.
|
* the {@code Location} header. This header typically indicates where the new resource is stored.
|
||||||
* <p>URI Template variables are expanded using the given URI variables, if any.
|
* <p>URI Template variables are expanded using the given URI variables, if any.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param uriVariables the variables to expand the template
|
* @param uriVariables the variables to expand the template
|
||||||
|
@ -164,7 +166,9 @@ public interface RestOperations {
|
||||||
* the {@code Location} header. This header typically indicates where the new resource is stored.
|
* the {@code Location} header. This header typically indicates where the new resource is stored.
|
||||||
* <p>URI Template variables are expanded using the given map.
|
* <p>URI Template variables are expanded using the given map.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param uriVariables the variables to expand the template
|
* @param uriVariables the variables to expand the template
|
||||||
|
@ -179,7 +183,9 @@ public interface RestOperations {
|
||||||
* Create a new resource by POSTing the given object to the URL, and returns the value of the
|
* Create a new resource by POSTing the given object to the URL, and returns the value of the
|
||||||
* {@code Location} header. This header typically indicates where the new resource is stored.
|
* {@code Location} header. This header typically indicates where the new resource is stored.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @return the value for the {@code Location} header
|
* @return the value for the {@code Location} header
|
||||||
|
@ -193,7 +199,9 @@ public interface RestOperations {
|
||||||
* and returns the representation found in the response.
|
* and returns the representation found in the response.
|
||||||
* <p>URI Template variables are expanded using the given URI variables, if any.
|
* <p>URI Template variables are expanded using the given URI variables, if any.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param responseType the type of the return value
|
* @param responseType the type of the return value
|
||||||
|
@ -210,7 +218,9 @@ public interface RestOperations {
|
||||||
* and returns the representation found in the response.
|
* and returns the representation found in the response.
|
||||||
* <p>URI Template variables are expanded using the given map.
|
* <p>URI Template variables are expanded using the given map.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param responseType the type of the return value
|
* @param responseType the type of the return value
|
||||||
|
@ -226,7 +236,9 @@ public interface RestOperations {
|
||||||
* Create a new resource by POSTing the given object to the URL,
|
* Create a new resource by POSTing the given object to the URL,
|
||||||
* and returns the representation found in the response.
|
* and returns the representation found in the response.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param responseType the type of the return value
|
* @param responseType the type of the return value
|
||||||
|
@ -241,7 +253,9 @@ public interface RestOperations {
|
||||||
* and returns the response as {@link ResponseEntity}.
|
* and returns the response as {@link ResponseEntity}.
|
||||||
* <p>URI Template variables are expanded using the given URI variables, if any.
|
* <p>URI Template variables are expanded using the given URI variables, if any.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param uriVariables the variables to expand the template
|
* @param uriVariables the variables to expand the template
|
||||||
|
@ -257,7 +271,9 @@ public interface RestOperations {
|
||||||
* and returns the response as {@link HttpEntity}.
|
* and returns the response as {@link HttpEntity}.
|
||||||
* <p>URI Template variables are expanded using the given map.
|
* <p>URI Template variables are expanded using the given map.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @param uriVariables the variables to expand the template
|
* @param uriVariables the variables to expand the template
|
||||||
|
@ -272,7 +288,9 @@ public interface RestOperations {
|
||||||
* Create a new resource by POSTing the given object to the URL,
|
* Create a new resource by POSTing the given object to the URL,
|
||||||
* and returns the response as {@link ResponseEntity}.
|
* and returns the response as {@link ResponseEntity}.
|
||||||
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
* <p>The {@code request} parameter can be a {@link HttpEntity} in order to
|
||||||
* add additional HTTP headers to the request.
|
* add additional HTTP headers to the request. The body of the entity, or {@code request} itself,
|
||||||
|
* can be a {@link org.springframework.http.client.MultipartBodyBuilder MultiValueMap} to
|
||||||
|
* simulate a multipart from submission.
|
||||||
* @param url the URL
|
* @param url the URL
|
||||||
* @param request the Object to be POSTed (may be {@code null})
|
* @param request the Object to be POSTed (may be {@code null})
|
||||||
* @return the converted object
|
* @return the converted object
|
||||||
|
|
|
@ -220,7 +220,9 @@ public abstract class BodyInserters {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a {@code FormInserter} that writes the given {@code MultiValueMap}
|
* Return a {@code FormInserter} that writes the given {@code MultiValueMap}
|
||||||
* as multipart data. Note that the returned inserter allows for additional entries to be added
|
* as multipart data. The {@code multipartData} parameter can conveniently be built using the
|
||||||
|
* {@link org.springframework.http.client.MultipartBodyBuilder MultipartBodyBuilder}.
|
||||||
|
* Note that the returned inserter allows for additional entries to be added
|
||||||
* via {@link FormInserter#with(String, Object)}.
|
* via {@link FormInserter#with(String, Object)}.
|
||||||
*
|
*
|
||||||
* <p><strong>Note:</strong> you can also use the {@code syncBody(Object)}
|
* <p><strong>Note:</strong> you can also use the {@code syncBody(Object)}
|
||||||
|
@ -243,8 +245,11 @@ public abstract class BodyInserters {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a {@code FormInserter} that writes the key-value pair as multipart data. Note that
|
* Return a {@code FormInserter} that writes the key-value pair as multipart data. The
|
||||||
* the returned inserter allows for additional entries to be added via
|
* {@code multipartData} parameter can conveniently be built using the
|
||||||
|
* {@link org.springframework.http.client.MultipartBodyBuilder MultipartBodyBuilder}.
|
||||||
|
* Note that the returned inserter allows for additional entries to be added
|
||||||
|
* via {@link FormInserter#with(String, Object)}.
|
||||||
* {@link FormInserter#with(String, Object)}.
|
* {@link FormInserter#with(String, Object)}.
|
||||||
* @param key the key to add to the form
|
* @param key the key to add to the form
|
||||||
* @param value the value to add to the form
|
* @param value the value to add to the form
|
||||||
|
|
Loading…
Reference in New Issue