Expand description
Normalizing what the JavaScript SDK actually sends.
The SDK does not speak the REST API the documentation describes. Everything is a POST with a
text/plain body, and the method, the credentials and the query parameters all travel inside
that body. It does this so a browser never sends a CORS preflight.
Upstream normalizes all of it before routing, in three places:
allowMethodOverride(middlewares.js:425-433) rewrites the method from_method.handleParseHeaders(:111-198) reads_ApplicationId,_JavaScriptKey,_MasterKey,_SessionToken,_InstallationId,_ContentTypeand friends from the body, and deletes them, which is why a saved Parse object never grows an_ApplicationIdfield.ClassesRoutermergesreq.bodywith the decoded query string, so awheresent in the body reaches the same code as one sent in the URL.
Doing all three here, in one layer, is deliberate. Spreading it across the extractor and each route is how a check ends up applied on one path and forgotten on another.
Structs§
- Method
Override - The method the client asked for through
_method, when it differs from the transport method.