Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 13 18:04
    Daniyal83 commented #126
  • Sep 12 20:20
    mikemorton commented #126
  • Sep 12 13:31
    Daniyal83 commented #126
  • Sep 12 13:28
    Daniyal83 edited #127
  • Sep 12 13:27
    Daniyal83 edited #127
  • Sep 12 13:17
    Daniyal83 opened #127
  • Sep 06 13:25
    mikemorton opened #126
  • Aug 02 05:31
    jerimiah797 commented on c644ecb
  • Jul 17 10:35
    x80486 commented #99
  • Mar 10 08:00
    shreyanshp commented #123
  • Mar 05 18:21
    guagualvcha opened #125
  • Feb 21 20:41

    nijikokun on v0.6.0


  • Feb 21 20:41

    nijikokun on master

    0.6.0 (compare)

  • Feb 21 20:39

    nijikokun on master

    chore(travis): update node engi… (compare)

  • Feb 21 20:36

    nijikokun on master

    docs(readme): update repository… (compare)

  • Feb 21 20:23
    nijikokun closed #106
  • Feb 21 20:23
    nijikokun closed #97
  • Feb 21 20:23
    nijikokun closed #113
  • Feb 21 20:23
    nijikokun closed #111
  • Feb 21 20:22
    nijikokun closed #117
Sebastian Cheung CQF
started using unirest, but couldn't understand why after an initial PUT command, if I followed by another PUT command I get 500 Error within my MeteorJS app, but I do not see the same error when using Postman Chrome?
Alex Valencia
Hi, anyone can help me? I'm having a problem with unirest, I just installed it with npm install unirest and when I try to require unirest I get a lot lot of error.
Hi All, I have an api developed with strongloop and I wanna use kong
And I am running it on windows with mssql as datastore
Where should I start from ?
Windows 7 it is
Augusto Marietti
@SandeshSarfare u can't use Kong with mssql. Also this is Unirest channel.
Marcos Filho
Hi, i can create a intercept to unirest request and response ?
hello verybody
how can i download image with unirest, thks
Sebastian Cheung CQF
Can unirest also connect directly from EC2 instance? Tri Example would be nice.
Tried in mongo shell which works : mongo ec2xxxx-xxxx-xxxxx:27017, but how to do this in unirest
as it is just JSON I am expecting
Hi everyone, I'm struggling with Unirest, I installed the NPM package and when I start my Vue application and require unirest I get this : Module not found: Error: Cannot resolve module 'fs' in C:\Dev\partial-importer\node_modules\unirest
No information found on Google whatsoever
Does anyone know what the heck is going on?
Karan Barsiwal
anyone online?
Maxim V
hey guys
I just found this nice library, called unirest
where can I download it?
for browser usage
Пушкин Денис
Привет! Есть русские?
Ashok Bakthavathsalam
Unirest rocks! Here's a small project I used it on Hyperdev - http://j.mp/questionsKG
I am keen to find out what changes need to be done to make it run without Node.js
Hello everyone
i am new to nodejs/javascript
var cityId = unirest.get(url).end(function (response) {
if (response.status === 200) {
return response.body.content[0].id;
how i can return parsed response body in above code block ?
thank you very much
Gianluca Saroni
hi guys, i'm trying to use unirest (npm install unirest), but i'm getting this error : "deprecated node-uuid@1.4.7: use uuid module instead" any suggestion?
hey guys
does any one know how to upload a string as a file ? :)
tried '.attach('file', 'test.txt', 'some text in file') // Attachment'
Robert Buchanan
With Unirest for Nodejs is it possible to set defaults at an application level such as a the 'Authorization' header without wrapping it in my own service/export?
@ioneyed just use CookieJar to keep the session ?
Aaron Bell
module.exports.tax = function (taxinfo) {
            //api key
            'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBUElfS0VZX01BTkFHRVIiLCJodHRwOi8vdGF4ZWUuaW8vdXNlcl9pZCI6IjU4NDQ4MTA4Mzg2NjhhMTU4ZDU0ZmIzNSIsImh0dHA6Ly90YXhlZS5pby9zY29wZXMiOlsiYXBpIl0sImlhdCI6MTQ5OTA1MzU0NX0.pOwC5JEC7trLaaZVgHHGu_rvN0-EGa3RMm8BgJ-M9gk"
            , 'Content-Type': 'application/x-www-form-urlencoded'
        //info to be pulled from form 
            "exemptions": 1
            , "filing_status": "single"
            , "pay_periods": 1
            , "pay_rate": taxinfo.income || 100000
            , "state": taxinfo.State || "NY"
        }).end(function (result) {
            return result.body.annual;
the result wont return in the express route response the call it
i dont understand why
Akash Chandra

Is there a way to assert no_delay for tcp packets in request.js library?

Also, is the same possible in standard library viz unirest.js

I found the same in node-rest-client using request-config

requestConfig: {
timeout: 1000, //request timeout in milliseconds
noDelay: true, //Enable/disable the Nagle algorithm
keepAlive: true, //Enable/disable keep-alive functionalityidle socket.
keepAliveDelay: 1000 //and optionally set the initial delay before the first keepalive probe is sent
I want to disable the Nagle algo as I see huge packets delay while load testing our application.

Need help in setting the same for request.js

hi guys, does unirest support es6?
hey is it possible to download a pdf file with unirest ? :)
Shoaib Mansoor

Hello Everyone,
I am following a case where I need to pass some cetificates for SSL authentication beore making any request.
I have tried to use 'request-promise-native' and got the correct response.
This is how I created request using 'request-promise-native':

const request = require('request-promise-native');
const options = {
    uri: baseUri + endPoint,
    port: 443,
    method: 'POST',
    headers: {
        'Content-type': 'application/json',
    cert: fs.readFileSync('cert.pem'),
    key: fs.readFileSync('key.pem'),
    ca: fs.readFileSync('ca.pem'),
const req = await request.post(options);
console.log(req); // Correct response

I tried the perform the same request using 'Unirest' but I am receiving the following error:
Request Code:

const request = require('unirest');
const req = await request
            .post(baseUri + ':' + port + endPoint)
            .header({'Content-Type': 'application/json'})
            .attach({cert: fs.readFileSync('cert.pem')})
            .attach({key: fs.readFileSync('key.pem')})
            .attach({ca: fs.readFileSync('ca.pem')})
console.log(req); //  {"error":{"code":"EPROTO","errno":"EPROTO","syscall":"write"}}

Also I tried to pass certificates using part & field method provided by Unirest, but same error message is received.
Can someone please guide me on this? Any help will be appreciated. Thanks.

A JSONObject text must begin with \'{\'
Any solution to this?
.header('authorization', 'Basic asdasdasdasdasd')
.header('cookie', 'Version=1;')
.field('metadata', '\'{\'\'}\'') // Form field
.attach('file', fs.createReadStream('abc.txt'), {})
.end(function (response: any) {
Hello, I have a little problem with my code.
I want to return a value that i get from the response from an unirest.get() but I can't with return inside the callback and outside due to the scope. I wanted to know if there was a way to return a value that i get from the response without doing another function outside the one I use. Thank you in advance for any help. (Sorry for my bad english, FR)
Nijiko Yonskai
@/all I have published 0.6.0 which includes promise support, and resolves the security / vulnerable bits.
With promise support comes support for Node Engines > 8 or 4 with the --harmony flag.
Hello there
Kovalchuk Evgeny
Hey guys, can I set content-type for particular "attach"? Like .attach('file', fs.createReadStream(path.join(__dirname, 'demo.po'), {"content-type": "multipart/form-data"})
Simon Fredrich
Hello, how do I use unirest inside a little html project?