com.restfb
Class DefaultWebRequestor

java.lang.Object
  extended by com.restfb.DefaultWebRequestor
All Implemented Interfaces:
WebRequestor

public class DefaultWebRequestor
extends Object
implements WebRequestor

Default implementation of a service that sends HTTP requests to the Facebook API endpoint.

Author:
Mark Allen

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.restfb.WebRequestor
WebRequestor.Response
 
Constructor Summary
DefaultWebRequestor()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWebRequestor

public DefaultWebRequestor()
Method Detail

executeGet

public WebRequestor.Response executeGet(String url)
                                 throws IOException
Description copied from interface: WebRequestor
Given a Facebook API endpoint URL, execute a GET against it.

Specified by:
executeGet in interface WebRequestor
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.
See Also:
WebRequestor.executeGet(java.lang.String)

executePost

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

Specified by:
executePost in interface WebRequestor
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.
See Also:
WebRequestor.executePost(java.lang.String, java.lang.String)

executePost

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

Specified by:
executePost in interface WebRequestor
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.
See Also:
WebRequestor.executePost(java.lang.String, java.lang.String, com.restfb.BinaryAttachment[])


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