Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializer.normalize() not called if request body is FormData #1085

Open
nwhittaker opened this issue May 3, 2023 · 0 comments
Open

Serializer.normalize() not called if request body is FormData #1085

nwhittaker opened this issue May 3, 2023 · 0 comments

Comments

@nwhittaker
Copy link

Observed

If the request's content-type is "x-www-form-urlencoded", and the route handler function calls normalizedRequestAttrs(), flow is directed towards:

attrs = this._getAttrsForFormRequest(request);

And away from:

attrs = this._getAttrsForRequest(request, modelName);

_getAttrsForRequest() ends up in _getJsonApiDocForRequest() where normalize() is called on the serializer:

return this.serializerOrRegistry.normalize(body, modelName);

However, _getAttrsForFormRequest() does not end up in _getJsonApiDocForRequest() so the serializer's normalize() method is never called.

Expected

A request with form data also hits the serializer's normalize() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant