forwardemail / forwardemail/superagent

request.toJSON() not taking into account FormData fields

Open
#1,245 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
16.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Currently `request.toJSON()` will only return method, url, data and headers. If there is a POST request with a header `'content-type': 'application/x-www-form-urlencoded;` set along with FormData fields, it will not return them.

It seems to me like a bug. If some data is set and is a part of the request, outputting a JSON representation of that request should not omit such important parts of it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.