Doesn't appear to work (error from postmark) unless you provide the Content-Length header. #10

Closed
antony opened this Issue Nov 4, 2012 · 5 comments

Comments

Projects
None yet
3 participants

antony commented Nov 4, 2012

Installed from NPMJS and gave it a go - constant errors (which, consequently, broke error handling too as the errors weren't in JSON format), until I hacked the js file to calculate and send the content length header which is required for POST requests.

Is nobody else experiencing this?

Owner

voodootikigod commented Nov 7, 2012

Nobody else is and your proposed fix actually broke a lot of people's code. Please provide supporting test as to why this "isn't working" and why you believe content length (which is by default added by node) isn't present? Are you using UTF-8 code?

antony commented Nov 9, 2012

Hi There,

My apologies if it broke your code, it was the fix I sent you which made it work for me - as the server was returning a 400 error before I placed that code into the file.

I didn't see any unit, integration or functional tests in the project and I'm quite new to nodejs so I didn't know how I would go about writing one.

Collaborator

Atinux commented Jun 11, 2014

I think you can close this issue, Content-Length is added on one of the last pull requests.

Owner

voodootikigod commented Jun 11, 2014

done and @Atinux adding you as a collaborator.

Collaborator

Atinux commented Jun 11, 2014

@voodootikigod cool!
Glad to help you, I use this module every day on my project, so I will maintain it for a long time!

atheken added a commit to jcfrancisco/postmark.js that referenced this issue Jul 11, 2017

Remove dynamic require (#10)
* Update Client.js

* Update clientDefaults.js

* Update Client.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment