public class NetworkUtils extends Object
| Constructor and Description |
|---|
NetworkUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
delete(Object input)
DELETEs a JSON string to Facebook.
|
static void |
delete(org.apache.http.entity.StringEntity input)
DELETEs a JSON string to Facebook.
|
static String |
get(String url)
Utility to send a GET request.
|
static FacebookUserProfile |
getUserProfile(String userId)
Method used to retrieve a
FacebookUserProfile from an ID using
the GET method. |
static String |
post(String url,
org.apache.http.entity.StringEntity entity)
Utility to send a POST request.
|
static void |
postFormDataMessage(String recipient,
AttachmentType type,
File file)
POSTs a message as a JSON string to Facebook.
|
static void |
postJsonMessage(Object input)
POSTs a message as a JSON string to Facebook.
|
static void |
postJsonMessage(org.apache.http.entity.StringEntity input)
POSTs a message as a JSON string to Facebook.
|
static void |
postThreadSetting(Object input)
POSTs a thread setting as a JSON string to Facebook.
|
static void |
postThreadSetting(org.apache.http.entity.StringEntity input)
POSTs a thread setting as a JSON string to Facebook.
|
String |
toString() |
public static FacebookUserProfile getUserProfile(String userId)
FacebookUserProfile from an ID using
the GET method.userId - the ID of the user to retrieve.public static void postJsonMessage(org.apache.http.entity.StringEntity input)
input - the JSON data to send.public static void postJsonMessage(Object input)
input - the JSON data to send.public static void postThreadSetting(org.apache.http.entity.StringEntity input)
input - the JSON data to send.public static void postThreadSetting(Object input)
input - the JSON data to send.public static void delete(org.apache.http.entity.StringEntity input)
input - the JSON data to send.public static void delete(Object input)
input - the JSON data to send.public static String post(String url, org.apache.http.entity.StringEntity entity)
url - the url we need to send the post request to.entity - the entity that containts the object we need to pass as part
of the post request.Stringpublic static String get(String url)
url - the url we need to send the get request to.Stringpublic static void postFormDataMessage(String recipient, AttachmentType type, File file)
recipient - the recipienttype - the typefile - the fileCopyright © 2017 BotMill. All rights reserved.