postman-code-generators
postman-code-generators copied to clipboard
Include content-length header in code generation
Is your feature request related to a problem? Please describe. Hi! I do have a problem in that I use Postman to flesh out integrations with FileMaker. What I usually do is put the request together with Postman, submit it, to make sure it works (which I can usually get it to work in Postman), then I use your handy dandy Code feature to generate the CURL code which I then copy into Curl arguments in FileMaker for an "Insert from URL" script step that includes a CURL submission, and it usually all works great. This time, it's not, and the discerning factor seems to be a header that is automatically generated by Postman that is not automatically generated by FileMaker, and it's not included in the headers shown in the CURL code generated by Postman. That header is the Content-length header. The Content-type is included in the CURL code by Postman, but not the Content-length. When I de-activate the Content-length header in Postman and try to submit, I get the very same error I do in FileMaker, so I'm pretty sure that's it.
When I try to manually include the header in FileMaker, it still doesn't work, but I can't even compare it to what Postman is doing, because I can't even see it.
My colleagues at Adatasol report the same issue. They've had similar problems, and the content-length header is especially troublesome because unlike Content-type, Postman provides no clue what it should look like.
Describe the solution you'd like I would like for the Content-length header to be included just like you're including Content-type. I think if you do that, it will get me on my way to solving the problem.
Additional context Thanks to Anthony S for getting back to me so quickly. I really appreciate your software.
@dmsers You can see the exact headers sent by Postman by clicking on "Console" button present on the bottom of the app.

Console contains the exact HTTP request that is sent, including the headers. You will find Content-Length sent by Postman there.

Now, the reason we don't add Content-Length header for Curl is that it is automatically generated by Curl itself. I am not familiar with Filemaker but if it just the header you want then you can copy it from the console.