Package com.restfb
Interface WebRequestor
-
- All Known Implementing Classes:
DefaultWebRequestor
,ETagWebRequestor
public interface WebRequestor
Specifies how a class that sendsHTTP
requests to the Facebook API endpoint must operate.- Author:
- Mark Allen
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
WebRequestor.Request
encapsulates the HTTP Request configurationstatic class
WebRequestor.Response
Encapsulates an HTTP response body and status code.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WebRequestor.Response
executeDelete(WebRequestor.Request request)
Given a Facebook API endpoint URL and parameter string, execute aDELETE
to the endpoint URL.WebRequestor.Response
executeGet(WebRequestor.Request request)
Given a Facebook API endpoint URL, execute aGET
against it.WebRequestor.Response
executePost(WebRequestor.Request request)
Given a Facebook API endpoint URL and parameter string, execute aPOST
to the endpoint URL.DebugHeaderInfo
getDebugHeaderInfo()
Provides access to the facebook header information.
-
-
-
Method Detail
-
executeGet
WebRequestor.Response executeGet(WebRequestor.Request request) throws IOException
Given a Facebook API endpoint URL, execute aGET
against it.- Parameters:
request
- The request data for theGET
request- Returns:
- HTTP response data.
- Throws:
IOException
- If an error occurs while performing theGET
operation.- Since:
- 1.5
-
executePost
WebRequestor.Response executePost(WebRequestor.Request request) throws IOException
Given a Facebook API endpoint URL and parameter string, execute aPOST
to the endpoint URL.- Parameters:
request
- The request data used for thePOST
request.- Returns:
- HTTP response data.
- Throws:
IOException
- If an error occurs while performing thePOST
.
-
executeDelete
WebRequestor.Response executeDelete(WebRequestor.Request request) throws IOException
Given a Facebook API endpoint URL and parameter string, execute aDELETE
to the endpoint URL.- Parameters:
request
- The request data used for theDELETE
request.- Returns:
- HTTP response data.
- Throws:
IOException
- If an error occurs while performing theDELETE
.
-
getDebugHeaderInfo
DebugHeaderInfo getDebugHeaderInfo()
Provides access to the facebook header information.The fields
x-fb-rev
,x-fb-trace-id
andx-fb-debug
are checked and returned in a single container of the typeDebugHeaderInfo
- Returns:
- container with the explained facebook debug header information
-
-