Package com.restfb
Interface WebRequestor
- All Known Implementing Classes:
DefaultWebRequestor
,ETagWebRequestor
public interface WebRequestor
Specifies how a class that sends
HTTP
requests to the Facebook API endpoint must operate.- Author:
- Mark Allen
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
encapsulates the HTTP Request configurationstatic class
Encapsulates an HTTP response body and status code. -
Method Summary
Modifier and TypeMethodDescriptionexecuteDelete
(WebRequestor.Request request) Given a Facebook API endpoint URL and parameter string, execute aDELETE
to the endpoint URL.executeGet
(WebRequestor.Request request) Given a Facebook API endpoint URL, execute aGET
against it.executePost
(WebRequestor.Request request) Given a Facebook API endpoint URL and parameter string, execute aPOST
to the endpoint URL.Provides access to the facebook header information.
-
Method Details
-
executeGet
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
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
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
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
-