postman-to-k6
postman-to-k6 copied to clipboard
Post request incorrectly exported from Postman to k6
Hi! I faced the following problem: In Postman (Version 9.28.1) I have POST request with Content-Type="application/x-www-form-urlencoded"

After export collection I have
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
Because of this, the k6 request returned a 400 error and I could not understand what was wrong for a long time.
Sorry, I realized it's a postman problem 🙃
Hi @jekakos
Postman excludes "default" headers from the export, which results in missing headers when making the requests. Have a look at: https://github.com/apideck-libraries/postman-to-k6/discussions/42#discussioncomment-2271512 >> Missing headers.
The item also mentions some work-a-rounds to overcome the situation.
If the work-a-round helped, feel free to close the issue.
Closing the issue, because of inactivity. Feel free to reopen if the issue is still occurring and the work-a-round did not solved your issue.