public class FHActRequest extends FHRemote
//calling a cloud side function called "getTweets" and pass in the keywords
FHActRequest request = FH.buildActRequest("getTweets", new JSONObject().put("keyword",
"FeedHenry"));
reqeust.executeAsync(new FHActCallback(){
public void success(FHResponse pResp){
JSONObject tweetsObj = pResp.getJson();
...
}
public void fail(FHResponse pResp){
//process error data
...
}
});
| Modifier and Type | Field and Description |
|---|---|
protected static String |
LOG_TAG |
protected JSONObject |
mArgs |
mCallback, mContext, PATH_PREFIX| Constructor and Description |
|---|
FHActRequest(android.content.Context context)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected cz.msebera.android.httpclient.Header[] |
buildHeaders(cz.msebera.android.httpclient.Header[] pHeaders) |
protected String |
getApiURl() |
protected String |
getPath() |
protected JSONObject |
getRequestArgs() |
void |
setArgs(JSONObject pArgs)
Set the parameters for the cloud side function
|
void |
setRemoteAction(String pAction)
The name of the cloud side function
|
execute, executeAsync, executeAsync, setCallbackprotected JSONObject mArgs
protected static String LOG_TAG
public FHActRequest(android.content.Context context)
context - the application contextpublic void setRemoteAction(String pAction)
pAction - cloud side function namepublic void setArgs(JSONObject pArgs)
pArgs - the parameters that will be passed to the cloud side functionprotected JSONObject getRequestArgs()
getRequestArgs in class FHRemoteprotected cz.msebera.android.httpclient.Header[] buildHeaders(cz.msebera.android.httpclient.Header[] pHeaders)
buildHeaders in class FHRemoteCopyright © 2016 Red Hat. All rights reserved.