Method Web.Api.Api()->call()
- Method call
mixedcall(stringapi_method,void|ParamsArgparams,void|stringhttp_method,void|stringdata,void|Callbackcb)- Description
Calls a remote API method.
- Throws
An exception is thrown if the response status code is other than
200,301or302.- Parameter
api_method The remote API method to call! This should be a Fully Qualified Domain Name
- Parameter
params Additional params to send in the request
- Parameter
http_method HTTP method to use.
GETis default- Parameter
data Inline data to send in a
POSTrequest for instance.- Parameter
cb Callback function to get into in async mode
- Returns
If JSON is available the JSON response from servie will be decoded and returned. If not, the raw response (e.g a JSON string) will be returned. The exception to this is if the status code in the response is a
30x(a redirect), then the response headers mapping will be returned.