@@ -197,28 +197,6 @@ RequestParams params = new RequestParams(paramMap);
197
197
See the [ RequestParams Javadoc] ( http://loopj.com/android-async-http/doc/com/loopj/android/http/RequestParams.html )
198
198
for more information.
199
199
200
- Adding HTTP Basic Auth credentials
201
- ------------------------------------
202
- Some requests may need username/password credentials when dealing with API services that use HTTP Basic Access Authentication requests.
203
- You can use the method ` setBasicAuth() ` to provide your credentials.
204
-
205
- Set username/password for any host and realm for a particular request. By default the Authentication Scope is for any host, port and realm.
206
- {% highlight java %}
207
- AsyncHttpClient client = new AsyncHttpClient();
208
- client.setBasicAuth("username","password/token");
209
- client.get("http://example.com ".....); //etc.
210
- {% endhighlight %}
211
-
212
- You can also provide a more specific Authentication Scope (recommended)
213
- {% highlight java %}
214
- AsyncHttpClient client = new AsyncHttpClient();
215
- client.setBasicAuth("username","password", new AuthScope("example.com",80, AuthScope.ANY_REALM));
216
- client.get("http://example.com ".....); //etc.
217
- {% endhighlight %}
218
-
219
- See the [ RequestParams Javadoc] ( http://loopj.com/android-async-http/doc/com/loopj/android/http/AsyncHttpClient.html )
220
- for more information.
221
-
222
200
Uploading Files with ` RequestParams `
223
201
------------------------------------
224
202
The ` RequestParams ` class additionally supports multipart file uploads as
@@ -269,6 +247,28 @@ client.get("http://example.com/file.png", new BinaryHttpResponseHandler(allowedC
269
247
See the [ BinaryHttpResponseHandler Javadoc] ( http://loopj.com/android-async-http/doc/com/loopj/android/http/BinaryHttpResponseHandler.html )
270
248
for more information.
271
249
250
+ Adding HTTP Basic Auth credentials
251
+ ------------------------------------
252
+ Some requests may need username/password credentials when dealing with API services that use HTTP Basic Access Authentication requests.
253
+ You can use the method ` setBasicAuth() ` to provide your credentials.
254
+
255
+ Set username/password for any host and realm for a particular request. By default the Authentication Scope is for any host, port and realm.
256
+ {% highlight java %}
257
+ AsyncHttpClient client = new AsyncHttpClient();
258
+ client.setBasicAuth("username","password/token");
259
+ client.get("http://example.com ".....); //etc.
260
+ {% endhighlight %}
261
+
262
+ You can also provide a more specific Authentication Scope (recommended)
263
+ {% highlight java %}
264
+ AsyncHttpClient client = new AsyncHttpClient();
265
+ client.setBasicAuth("username","password", new AuthScope("example.com",80, AuthScope.ANY_REALM));
266
+ client.get("http://example.com ".....); //etc.
267
+ {% endhighlight %}
268
+
269
+ See the [ RequestParams Javadoc] ( http://loopj.com/android-async-http/doc/com/loopj/android/http/AsyncHttpClient.html )
270
+ for more information.
271
+
272
272
Building from Source
273
273
--------------------
274
274
To build a ` .jar ` file from source, first make a clone of the
0 commit comments