You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dr. Daniel Alexander Smith edited this page Jul 29, 2014
·
1 revision
Basics
The HTTP wrapper is used to issue arbitrary HTTP calls to this server through the websocket. This reduces the overhead of creating new HTTP requests each time, in particular the overhead of a new TLS handshake.
Use an action of value http in all requests.
Fields
request - This is the actual HTTP request, which has the following subfields:
HTTP Request Object
uri - The full URI of the request e.g. http://i.ld.is:8211/somebox
method - The HTTP method to emulate, e.g. POST, GET, PUT
path - The path of the request e.g. /somebox
params - GET parameters as a subobject in the format:
{"keyname": ["value1", "value2"], "anotherkey", ["value"]} - note that values are always arrays.
content - The body of the HTTP request, usually POST variables when POST is the method.
Response
As with other methods, the respond_to will be set to http, and requestid will match the incoming requestid from the request.