News for hackers. Stuff that matters.
Re:Show HN: Unirest by onion2k on Tuesday October 22, 2013 @05:38AM (#6590667)
Looking at the examples for Node and PHP, those are essentially two different request libs with the same name. That lack of consistency is a problem - at the very least anyone thinking "porting this app to <language> will be easy because Unirest is available" will be in for a nasty surprise. At worst, it shows a lack of planning and a lack of communication within the Unirest team, and that's a very big problem for anyone relying on the code.

Moving forward, I'd recommend working very hard on unifying your featureset and API so it's consistent across all the versions.

Re:Show HN: Unirest by nijiko on Tuesday October 22, 2013 @02:23PM (#6593908)
Hello, actually you now can, I've made it similiar to the Java syntax, but if you want a more "PHP" style:

  unirest.get('http://httpbin.org/gzip', { 'Accept': 'gzip' }, 'Hello World', function (response) { });
or

  var Request = unirest.get('http://httpbin.org/gzip', { 'Accept': 'gzip' }, 'Hello World');
  Request.end(function (response) {});