com.restfb
Interface WebRequestor

All Known Implementing Classes:
DefaultWebRequestor

public interface WebRequestor

Specifies how a class that sends HTTP requests to the Facebook API endpoint must operate.

Author:
Mark Allen

Nested Class Summary
static class WebRequestor.Response
          Encapsulates an HTTP response body and status code.
 
Method Summary
 WebRequestor.Response executeGet(String url)
          Given a Facebook API endpoint URL, execute a GET against it.
 WebRequestor.Response executePost(String url, String parameters)
          Given a Facebook API endpoint URL and parameter string, execute a POST to the endpoint URL.
 WebRequestor.Response executePost(String url, String parameters, BinaryAttachment... binaryAttachments)
          Given a Facebook API endpoint URL and parameter string, execute a POST to the endpoint URL.
 

Method Detail

executeGet

WebRequestor.Response executeGet(String url)
                                 throws IOException
Given a Facebook API endpoint URL, execute a GET against it.

Parameters:
url - The URL to make a GET request for, including URL parameters.
Returns:
HTTP response data.
Throws:
IOException - If an error occurs while performing the GET operation.
Since:
1.5

executePost

WebRequestor.Response executePost(String url,
                                  String parameters)
                                  throws IOException
Given a Facebook API endpoint URL and parameter string, execute a POST to the endpoint URL.

Parameters:
url - The URL to POST to.
parameters - The parameters to be POSTed.
Returns:
HTTP response data.
Throws:
IOException - If an error occurs while performing the POST.

executePost

WebRequestor.Response executePost(String url,
                                  String parameters,
                                  BinaryAttachment... binaryAttachments)
                                  throws IOException
Given a Facebook API endpoint URL and parameter string, execute a POST to the endpoint URL.

Parameters:
url - The URL to POST to.
parameters - The parameters to be POSTed.
binaryAttachments - Optional binary attachments to be included in the POST body (e.g. photos and videos).
Returns:
HTTP response data.
Throws:
IOException - If an error occurs while performing the POST.


RestFB 1.6.8. Copyright © 2010-2011 Mark Allen. All Rights Reserved.