@@ -409,9 +409,7 @@ public void post(Context context, String url, HttpEntity entity, String contentT
409
409
* @param context the Android Context which initiated the request.
410
410
* @param url the URL to send the request to.
411
411
* @param headers set headers only for this request
412
- * @param entity a raw {@link HttpEntity} to send with the request, for
413
- * example, use this to send string/json/xml payloads to a server by
414
- * passing a {@link org.apache.http.entity.StringEntity}.
412
+ * @param params additional POST parameters to send with the request.
415
413
* @param contentType the content type of the payload you are sending, for
416
414
* example application/json if sending a json payload.
417
415
* @param responseHandler the response handler instance that should handle
@@ -426,6 +424,28 @@ public void post(Context context, String url, Header[] headers, RequestParams pa
426
424
responseHandler , context );
427
425
}
428
426
427
+ /**
428
+ * Perform a HTTP POST request and track the Android Context which initiated
429
+ * the request. Set headers only for this request
430
+ *
431
+ * @param context the Android Context which initiated the request.
432
+ * @param url the URL to send the request to.
433
+ * @param headers set headers only for this request
434
+ * @param entity a raw {@link HttpEntity} to send with the request, for
435
+ * example, use this to send string/json/xml payloads to a server by
436
+ * passing a {@link org.apache.http.entity.StringEntity}.
437
+ * @param contentType the content type of the payload you are sending, for
438
+ * example application/json if sending a json payload.
439
+ * @param responseHandler the response handler instance that should handle
440
+ * the response.
441
+ */
442
+ public void post (Context context , String url , Header [] headers , HttpEntity entity , String contentType ,
443
+ AsyncHttpResponseHandler responseHandler ) {
444
+ HttpEntityEnclosingRequestBase request = addEntityToRequestBase (new HttpPost (url ), entity );
445
+ if (headers != null ) request .setHeaders (headers );
446
+ sendRequest (httpClient , httpContext , request , contentType , responseHandler , context );
447
+ }
448
+
429
449
//
430
450
// HTTP PUT Requests
431
451
//
0 commit comments