public class DefaultWebRequestor extends Object implements WebRequestor
WebRequestor.Response
Constructor and Description |
---|
DefaultWebRequestor() |
Modifier and Type | Method and Description |
---|---|
WebRequestor.Response |
executeDelete(String url)
Given a Facebook API endpoint URL and parameter string, execute a
DELETE to the endpoint URL. |
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. |
Map<String,List<String>> |
getCurrentHeaders()
access to the current response headers
|
DebugHeaderInfo |
getDebugHeaderInfo()
Provides access to the facebook header information.
|
boolean |
isAutocloseBinaryAttachmentStream()
returns if the binary attachment stream is closed automatically
|
void |
setAutocloseBinaryAttachmentStream(boolean autocloseBinaryAttachmentStream)
define if the binary attachment stream is closed automatically after sending the content to facebook
|
public DefaultWebRequestor()
public WebRequestor.Response executeGet(String url) throws IOException
WebRequestor
GET
against it.executeGet
in interface WebRequestor
url
- The URL to make a GET
request for, including URL parameters.IOException
WebRequestor.executeGet(java.lang.String)
public WebRequestor.Response executePost(String url, String parameters) throws IOException
WebRequestor
POST
to the endpoint URL.executePost
in interface WebRequestor
url
- The URL to POST
to.parameters
- The parameters to be POST
ed.IOException
WebRequestor.executePost(java.lang.String, java.lang.String)
public WebRequestor.Response executePost(String url, String parameters, BinaryAttachment... binaryAttachments) throws IOException
WebRequestor
POST
to the endpoint URL.executePost
in interface WebRequestor
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).IOException
WebRequestor.executePost(java.lang.String, java.lang.String, com.restfb.BinaryAttachment[])
public boolean isAutocloseBinaryAttachmentStream()
public void setAutocloseBinaryAttachmentStream(boolean autocloseBinaryAttachmentStream)
autocloseBinaryAttachmentStream
- public Map<String,List<String>> getCurrentHeaders()
public WebRequestor.Response executeDelete(String url) throws IOException
WebRequestor
DELETE
to the endpoint URL.executeDelete
in interface WebRequestor
url
- The URL to submit the DELETE
to.IOException
- If an error occurs while performing the DELETE
.public DebugHeaderInfo getDebugHeaderInfo()
WebRequestor
x-fb-rev
, x-fb-trace-id
and x-fb-debug
are checked and returned
in a single container of the type DebugHeaderInfo
getDebugHeaderInfo
in interface WebRequestor
RestFB 1.38.0. Copyright © 2010-2015 Mark Allen. All Rights Reserved.