com.restfb
Class DefaultWebRequestor
java.lang.Object
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
DefaultWebRequestor
public DefaultWebRequestor()
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 POST
ed.
- 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 POST
ed.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.