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
Let's create a new contract to execute the functions that we can encapsulate the request and the response of our requests and pass it forward to our functions.
The request object will contain the body that will indicate the body of the request the headers, which will contains the request headers and the query with the query string from the request.
The response object will contain the send method which will be invoked when it is needed to send back a response, the status method that will be used to set the status of the response and the set that will be used to set the headers of the response.
The text was updated successfully, but these errors were encountered:
As described on the issue globocom#11 this introuces the SandboxResponse object
that makes possible for the function to send custom body, headers and
status code
This commits changes the way we run our function in the cloud, before we
passed the args and a callback function, now a req object is
deliveried with the basic content that is needed and a res object. One
can set the response, add headers and change the status code of the
response.
Let's create a new contract to execute the functions that we can encapsulate the request and the response of our requests and pass it forward to our functions.
the new way to write functions will be
The
request
object will contain thebody
that will indicate the body of the request theheaders
, which will contains the request headers and thequery
with the query string from the request.The
response
object will contain thesend
method which will be invoked when it is needed to send back a response, thestatus
method that will be used to set the status of the response and theset
that will be used to set the headers of the response.The text was updated successfully, but these errors were encountered: