postman-to-k6 icon indicating copy to clipboard operation
postman-to-k6 copied to clipboard

Post request incorrectly exported from Postman to k6

Open jekakos opened this issue 2 years ago • 3 comments

Hi! I faced the following problem: In Postman (Version 9.28.1) I have POST request with Content-Type="application/x-www-form-urlencoded"

image

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.

jekakos avatar Aug 31 '22 12:08 jekakos

Sorry, I realized it's a postman problem 🙃

jekakos avatar Aug 31 '22 12:08 jekakos

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.

thim81 avatar Sep 01 '22 12:09 thim81

If the work-a-round helped, feel free to close the issue.

thim81 avatar Sep 01 '22 12:09 thim81

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.

thim81 avatar Nov 12 '22 18:11 thim81