Class BatchRequest


public class BatchRequest
extends Object
Encapsulates a discrete part of an entire Facebook Batch API request.

Must be constructed by BatchRequest.BatchRequestBuilder.

Mark Allen
See Also:
  • Constructor Details

    • BatchRequest

      protected BatchRequest​(String relativeUrl, List<Parameter> parameters, String method, List<BatchHeader> headers, List<Parameter> bodyParameters, String attachedFiles, String dependsOn, String name, boolean omitResponseOnSuccess)
      Designed to be invoked by instances of BatchRequest.BatchRequestBuilder .
      relativeUrl - The endpoint to hit, for example "me/friends".
      parameters - Optional list of URL parameters to be added to the value specified in relativeUrl.
      method - The HTTP method to use, for example "GET".
      headers - The list of HTTP headers for the request.
      bodyParameters - The parameters that comprise the request body, for example "message=Test status update" .
      attachedFiles - Names of any attached files for this call, for example "cat1, cat2".
      name - The logical name of this request, for example "get-friends".
      dependsOn - If this call depends on the completion of another call in the current batch, for example "get-friends".
      omitResponseOnSuccess - To make sure FB returns JSON in the event that this request completes successfully, set this to false.
      IllegalArgumentException - If relativeUrl is null.
  • Method Details