diff options
author | Jeff Davidson <jpd@google.com> | 2014-10-17 19:25:14 -0700 |
---|---|---|
committer | Jeff Davidson <jpd@google.com> | 2014-10-17 19:28:04 -0700 |
commit | ca7580d8ffae6d53500397d920570e77008f15fb (patch) | |
tree | c0340feb39ec11a25a1d2bdcf72d8a28507f3b61 /src | |
parent | b87331c8b80f2cbabce4eb9979cca3917dd02600 (diff) | |
download | volley-ca7580d8ffae6d53500397d920570e77008f15fb.tar.gz |
Clarify javadocs for getBody() and getBodyContentType().
Change-Id: I83a538bb466b6fd7801961ef47952009bb0defdb
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/volley/Request.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/volley/Request.java b/src/com/android/volley/Request.java index 89938d7..9832952 100644 --- a/src/com/android/volley/Request.java +++ b/src/com/android/volley/Request.java @@ -427,6 +427,9 @@ public abstract class Request<T> implements Comparable<Request<T>> { return DEFAULT_PARAMS_ENCODING; } + /** + * Returns the content type of the POST or PUT body. + */ public String getBodyContentType() { return "application/x-www-form-urlencoded; charset=" + getParamsEncoding(); } @@ -434,6 +437,10 @@ public abstract class Request<T> implements Comparable<Request<T>> { /** * Returns the raw POST or PUT body to be sent. * + * <p>By default, the body consists of the request parameters in + * application/x-www-form-urlencoded format. When overriding this method, consider overriding + * {@link #getBodyContentType()} as well to match the new body format. + * * @throws AuthFailureError in the event of auth failure */ public byte[] getBody() throws AuthFailureError { |