Comments (3)
Here's what the shape of a request object from the latest version of sandbox looks like:
{ method: 'get',
httpMethod: 'get',
path: '/',
headers:
{ host: 'localhost:3333',
connection: 'keep-alive',
'upgrade-insecure-requests': '1',
'user-agent':
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36',
accept:
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-US,en;q=0.9,es-MX;q=0.8,es;q=0.7,pl-PL;q=0.6,pl;q=0.5',
Cookie:
'io=NwtYYc7ewLEqLp8iAAAC; AMCVS_707535C75AF1E1630A495E73%40AdobeOrg=1; AMCV_707535C75AF1E1630A495E73%40AdobeOrg=-330454231%7CMCIDTS%7C17962%7CMCMID%7C62533939180920330170689695036116870502%7CMCAAMLH-1552496273%7C9%7CMCAAMB-1552496273%7CRKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y%7CMCOPTOUT-1551898673s%7CNONE%7CMCAID%7C2E172D528507D072-600001100001C2E5%7CvVersion%7C3.1.2; s_cc=true; s_dmdbase=1; AMCVS_9E1005A551ED61CA0A490D45%40AdobeOrg=1; AMCV_9E1005A551ED61CA0A490D45%40AdobeOrg=-1303530583%7CMCMID%7C62275305610138225320663840406792841947%7CMCAAMLH-1560882905%7C7%7CMCAAMB-1560882905%7CRKhpRz8krg2tLO6pguXWp5olkAcUniQYPHaMWWgdJ3xzPWQmdj0y%7CMCOPTOUT-1560285305s%7CNONE%7CvVersion%7C3.3.0%7CMCAID%7C2E0567BD85032066-4000119E0000544F%7CMCCIDH%7C64000490; s_nr=1560278350045-Repeat; adcloud={%22_les_v%22:%22y%2Clocalhost%2C1560280150%22}; s_ppv=[%22localhost/%22%2C26%2C0%2C669%2C1440%2C669%2C1440%2C900%2C2%2C%22P%22]; null; _idx=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4R0NNIn0.._j8FIlciOSqJ-pt2.Ka1kZN0z_Tb6DA30XXS_joMtJkJlpo9_eZPTymp1Jjq0fMh6guufkZZtdCAUDn0s5zTGrQ.TVacZNNQ12OcoidySuJHTA' },
query: {},
queryStringParameters: {},
body: {},
params: {} }
Based on this, I would suggest we change the middleware implementation to look for the property httpMethod
to differentiate between requests and responses, as httpMethod
is present on both sandbox and lambda request objects.
from functions.
Quick gut check here: the keys of the request object that are consistent in both sandbox and lambda environments are:
[ 'path',
'httpMethod',
'headers',
'queryStringParameters',
'body' ]
from functions.
Yes and we need to add some to align w https://arc.begin.com/primitives/http
from functions.
Related Issues (20)
- Build backwards compat for `multiValueHeaders` and `multiValueQueryStringParameters`?
- Rate exceeded doing SNS scans in events.publish
- arc.http.express does not correctly resolve the request method HOT 1
- arc.tables indexes HOT 2
- Changing the value of NODE_ENV can break builds HOT 4
- Deploy failed after following quickstart HOT 5
- Feature suggestion for full static manifest output HOT 2
- Improve handling of body parsing errors
- Before erroring out due to a missing entry in the service map, run service discovery once
- Publish to sandbox queue reads events port from wrong property HOT 2
- brotli compression breaks Sandbox livereload HOT 1
- dtslint it pinned, either rework TS lint step or scrap it
- A couple type defs missing for aliases HOT 1
- Arc deploy failing with AWS CICD
- Static does not work with fingerprinting HOT 2
- Type definition for tables()._db, tables()._doc is wrong for nodejs18.x runtime HOT 10
- Allow passing translateConfig to Dynamo client and doc client HOT 8
- Add option to enable/disable brotli compression
- JWE secret is not correctly passed for encryption
- arc.http[.async] in version 7.0.0 are overly strict regarding mixing sync and async middleware
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functions.