-
Notifications
You must be signed in to change notification settings - Fork 6
Websockets HTTP
Dr. Daniel Alexander Smith edited this page Jul 29, 2014
·
1 revision
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.
-
request
- This is the actual HTTP request, which has the following subfields:
-
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, usuallyPOST
variables whenPOST
is the method.
As with other methods, the respond_to
will be set to http
, and requestid
will match the incoming requestid
from the request.