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 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,
InputStream binaryAttachment)
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.binaryAttachment - A binary attachment to be included in the POST body (e.g.
a photo).
- Returns:
- HTTP response data.
- Throws:
IOException - If an error occurs while performing the POST.- See Also:
WebRequestor.executePost(java.lang.String,
java.lang.String, java.io.InputStream)
RestFB version 1.5.3. Copyright © 2010 Mark Allen. All Rights Reserved.