| Package | org.restfulx.controllers.mock |
| Class | public class MockAuxHTTPController |
| Inheritance | MockAuxHTTPController AuxHTTPController flash.events.EventDispatcher |
AuxHTTPController send
method to the specified Rx.httpControllerHandler function.
This is useful for mocking AuxHTTPController calls or doing something
entirely different with them.
| Method | Defined by | ||
|---|---|---|---|
|
MockAuxHTTPController(optsOrOnResult:Object = null, onFault:Function = null, contentType:String = "application/x-www-form-urlencoded", resultFormat:String = "e4x", serializer:ISerializer = null, rootUrl:String = null)
| MockAuxHTTPController | ||
![]() |
invoke(optsOrURL:Object, data:Object = null, method:Boolean, unmarshall:String = "false", cacheBy:Object = null, httpHeaders:* = null):void
Invokes a specified URL using indicated method and passing provided data.
| AuxHTTPController | |
|
send(url:String, data:Object = null, method:int, responder:IResponder = null, httpHeaders:Object = null):void
A different take on invoke.
| MockAuxHTTPController | ||
| MockAuxHTTPController | () | constructor |
public function MockAuxHTTPController(optsOrOnResult:Object = null, onFault:Function = null, contentType:String = "application/x-www-form-urlencoded", resultFormat:String = "e4x", serializer:ISerializer = null, rootUrl:String = null)Parameters
optsOrOnResult:Object (default = null) — can be either an anonymous object of options or a result handler
function.
|
|
onFault:Function (default = null) — function to call on HTTPService error or if unmarshalling fails
|
|
contentType:String (default = "application/x-www-form-urlencoded") — content type for the request
|
|
resultFormat:String (default = "e4x") — what to treat the response as (e.g. e4x, text)
|
|
serializer:ISerializer (default = null) — what serializer to use (default is XML)
|
|
rootUrl:String (default = null) — the URL to prefix to requests
|
| send | () | method |
public override function send(url:String, data:Object = null, method:int, responder:IResponder = null, httpHeaders:Object = null):voidA different take on invoke. Can be used with standalone org.restfulx.controllers.ICommand implementations if they also implement IResponder interface.
Parametersurl:String — URL to call
|
|
data:Object (default = null) — data to pass along
|
|
method:int — method to use
|
|
responder:IResponder (default = null) — IResponder implementation to callback.
|
|
httpHeaders:Object (default = null) — an object (key, value pairs) of HTTP headers to send along with this request
|