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
The Request API would work a lot like Response does in the sense, it's job is to handle the request object and provide easy ways to work with the data.
It will be contained within the request module and usable like so:
const{ parse }=require('octoris/request')
Now also like response parse won't be it's only function it's just the only one in planning atm. Each function will be granted it's own issue.
Usage
The below example is simply giving the status code to the function and then the data, as mentioned above this may or may not be a thing.
const{ parse }=require('octoris/request')const{ send }=require('octoris/response')constpostHandler=ctx=>{constdata=parse(ctx.data)if(!data){returnsend(500,'No Data Provided')}returnsend(200,'Data Saved!')}
The text was updated successfully, but these errors were encountered:
This is subject to change as the planning continues and grows
Related Issues
Description
The Request API would work a lot like Response does in the sense, it's job is to handle the request object and provide easy ways to work with the data.
It will be contained within the request module and usable like so:
Now also like response
parse
won't be it's only function it's just the only one in planning atm. Each function will be granted it's own issue.Usage
The below example is simply giving the status code to the function and then the data, as mentioned above this may or may not be a thing.
The text was updated successfully, but these errors were encountered: