org.fusesource.restygwt.client
Class JsonpMethod
java.lang.Object
org.fusesource.restygwt.client.Method
org.fusesource.restygwt.client.JsonpMethod
public class JsonpMethod
- extends Method
A specialized method which accesses a resource as a JSONP request.
- Author:
- Hiram Chirino
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonpMethod
public JsonpMethod(Resource resource)
callbackParam
public JsonpMethod callbackParam(String callbackParam)
failureCallbackParam
public JsonpMethod failureCallbackParam(String failureCallbackParam)
timeout
public Method timeout(int timeout)
- Overrides:
timeout in class Method
send
public void send(JsonCallback callback)
- Overrides:
send in class Method
send
public void send(TextCallback callback)
- Overrides:
send in class Method
send
public void send(AsyncCallback<JavaScriptObject> callback)
- helper method to make RestServiceClassCreator easier to maintain
- Parameters:
callback -
send
public void send(RequestCallback callback)
throws RequestException
- Overrides:
send in class Method
- Throws:
RequestException
expect
public Method expect(int... status)
- Description copied from class:
Method
- sets the expected response status code. If the response status code does not match
any of the values specified then the request is considered to have failed. Defaults to accepting
200,201,204. If set to -1 then any status code is considered a success.
- Overrides:
expect in class Method
getRequest
public Request getRequest()
- Overrides:
getRequest in class Method
getResponse
public Response getResponse()
- Overrides:
getResponse in class Method
header
public Method header(String header,
String value)
- Overrides:
header in class Method
headers
public Method headers(Map<String,String> headers)
- Overrides:
headers in class Method
json
public Method json(JSONValue data)
- Overrides:
json in class Method
password
public Method password(String password)
- Overrides:
password in class Method
send
public void send(XmlCallback callback)
- Overrides:
send in class Method
text
public Method text(String data)
- Overrides:
text in class Method
user
public Method user(String user)
- Overrides:
user in class Method
xml
public Method xml(Document data)
- Overrides:
xml in class Method
Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.