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
Of course I would like to have the maintainers of the API make it compliant with the format that is most commonly used, but it is unlikely to happen any time soon.
Hence, I was hoping to use the 'beforeRequest' hook to pass the body on the format they expect, but it seems the 'normalization' happens after.
I would like to keep using got for this, and not have to use another request library for this particular use case. Is this possible with got?
Checklist
I have read the documentation.
The text was updated successfully, but these errors were encountered:
It seems to even be the default behvaiour of fetch as well, so I guess not... I will probably have to do it with something a bit lower level, like node:http sadly ... That's what happens when you have to use APIs that are not following the most widely accepted use of standards ...
What would you like to discuss?
I have a use case where I need to send a request to an API that expects a POST request with:
'content-type': 'application/x-www-form-urlencoded'
and form data that looks like URLSearchParams...:
attr1=abcdef&date=ge2021-01-02T07:51:01Z&date=le2021-01-04T08:00:00Z
Got performs a normalization step on the body and correctly transforms it to:
Of course I would like to have the maintainers of the API make it compliant with the format that is most commonly used, but it is unlikely to happen any time soon.
Hence, I was hoping to use the 'beforeRequest' hook to pass the body on the format they expect, but it seems the 'normalization' happens after.
I would like to keep using got for this, and not have to use another request library for this particular use case. Is this possible with got?
Checklist
The text was updated successfully, but these errors were encountered: