Skip to content

Commit d59808e

Browse files
committed
Javadoc updated
1 parent b1d668e commit d59808e

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

library/src/main/java/com/loopj/android/http/AsyncHttpClient.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,22 @@
9292
* ResponseHandlerInterface} instance. <p>&nbsp;</p> For example: <p>&nbsp;</p>
9393
* <pre>
9494
* AsyncHttpClient client = new AsyncHttpClient();
95-
* client.get("http://www.google.com", new ResponseHandlerInterface() {
95+
* client.get("http://www.google.com", new AsyncHttpResponseHandler() {
9696
* &#064;Override
97-
* public void onSuccess(String response) {
98-
* System.out.println(response);
97+
* public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {
98+
* System.out.println(response);
99+
* }
100+
* &#064;Override
101+
* public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error)
102+
* {
103+
* error.printStackTrace(System.out);
99104
* }
100105
* });
101106
* </pre>
107+
*
108+
* @see com.loopj.android.http.AsyncHttpResponseHandler
109+
* @see com.loopj.android.http.ResponseHandlerInterface
110+
* @see com.loopj.android.http.RequestParams
102111
*/
103112
public class AsyncHttpClient {
104113

@@ -509,8 +518,8 @@ public void setMaxRetriesAndTimeout(int retries, int timeout) {
509518
}
510519

511520
/**
512-
* Will, before sending, remove all headers currently present in AsyncHttpClient instance,
513-
* which applies on all requests this client makes
521+
* Will, before sending, remove all headers currently present in AsyncHttpClient instance, which
522+
* applies on all requests this client makes
514523
*/
515524
public void removeAllHeaders() {
516525
clientHeaderMap.clear();

library/src/main/java/com/loopj/android/http/SaxAsyncHttpResponseHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
* AsyncHttpClient ahc = new AsyncHttpClient();
2626
* FontHandler handlerInstance = ... ; // init handler instance
2727
* ahc.post("https://server.tld/api/call", new SaxAsyncHttpResponseHandler<FontHandler>(handlerInstance){
28+
* &#064;Override
2829
* public void onSuccess(int statusCode, Header[] headers, FontHandler t) {
2930
* // Request got HTTP success statusCode
3031
* }
32+
* &#064;Override
3133
* public void onFailure(int statusCode, Header[] headers, T t){
3234
* // Request got HTTP fail statusCode
3335
* }

0 commit comments

Comments
 (0)