Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of post #20

petermilan opened this issue Jun 19, 2014 · 2 comments

Usage of post #20

petermilan opened this issue Jun 19, 2014 · 2 comments


Copy link

@petermilan petermilan commented Jun 19, 2014

Could you please add example of usage of I tried to use it like this:

var uti = '';
var options = {
  payload: JSON.stringify(data),
  json: true
};, options, function(err, res, payload) {


which seems to work in most cases, but if data contains some strange character it will throw an error:

{ [Error: Client request error: socket hang up]
  code: 'ECONNRESET',
  trace: [ { method: 'POST', url: '' } ],
  isBoom: true,
  data: null,
   { statusCode: 502,
      { statusCode: 502,
        error: 'Bad Gateway',
        message: 'socket hang up' },
     headers: {} },
  reformat: [Function] }

I figured out that the strange character is "ć".

How should the post method be called correctly?


This comment has been minimized.

Copy link

@hueniverse hueniverse commented Jun 19, 2014

Try making the same request with the request module and see what happens.


This comment has been minimized.

Copy link

@petermilan petermilan commented Jun 23, 2014

Hello, I've tried:

var request = require('request');
//data.field = "ć";,{form: data}, function(error, response, body) {

And this worked for me.

@nlf nlf closed this in a3db17f Aug 3, 2014
hueniverse added a commit that referenced this issue Aug 3, 2014
allow for unicode characters in string payloads, closes #20
@hueniverse hueniverse added the bug label Aug 3, 2014
@hueniverse hueniverse modified the milestones: 2.5.5, 2.5.4 Aug 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.