Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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

    (compare)

  • 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
@scheung38
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
@AlexValGal
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.
Sandesh
@SandeshSarfare
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
@sonicaghi
@SandeshSarfare u can't use Kong with mssql. Also this is Unirest channel.
Marcos Filho
@MAAARKIN
Hi, i can create a intercept to unirest request and response ?
soberlevi
@soberlevi
hello verybody
how can i download image with unirest, thks
Sebastian Cheung CQF
@scheung38
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
Loup
@Ephasme
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
@Barsiwal
anyone online?
Maxim V
@maximvl
hey guys
whatsup
I just found this nice library, called unirest
where can I download it?
for browser usage
Пушкин Денис
@demsky447_twitter
Привет! Есть русские?
Ashok Bakthavathsalam
@kgashok
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
Mesut
@mesut
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;
}
});
console.log(cityId)
how i can return parsed response body in above code block ?
thank you very much
Gianluca Saroni
@gianlucasaroni
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?
thbl
@thbl
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
@ioneyed
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?
thbl
@thbl
@ioneyed just use CookieJar to keep the session ?
Aaron Bell
@awb715
module.exports.tax = function (taxinfo) {
    unirest.post("https://taxee.io/api/v2/calculate/2017").headers({
            //api key
            'Authorization': "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBUElfS0VZX01BTkFHRVIiLCJodHRwOi8vdGF4ZWUuaW8vdXNlcl9pZCI6IjU4NDQ4MTA4Mzg2NjhhMTU4ZDU0ZmIzNSIsImh0dHA6Ly90YXhlZS5pby9zY29wZXMiOlsiYXBpIl0sImlhdCI6MTQ5OTA1MzU0NX0.pOwC5JEC7trLaaZVgHHGu_rvN0-EGa3RMm8BgJ-M9gk"
            , 'Content-Type': 'application/x-www-form-urlencoded'
        })
        //info to be pulled from form 
        .send({
            "exemptions": 1
            , "filing_status": "single"
            , "pay_periods": 1
            , "pay_rate": taxinfo.income || 100000
            , "state": taxinfo.State || "NY"
        }).end(function (result) {
            console.log(result.body.annual)
            return result.body.annual;
        });
};
the result wont return in the express route response the call it
i dont understand why
Akash Chandra
@jaliph

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

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

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:
{"error":{"code":"EPROTO","errno":"EPROTO","syscall":"write"}}
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')})
            .end();
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.

Ghost
@ghost~5a226423d73408ce4f815588
Hi
A JSONObject text must begin with \'{\'
Any solution to this?
unirest
.post('https://url')
.header('authorization', 'Basic asdasdasdasdasd')
.header('cookie', 'Version=1;')
.field('metadata', '\'{\'\'}\'') // Form field
.attach('file', fs.createReadStream('abc.txt'), {})
.end(function (response: any) {
console.log(response.body);
});
CosmoLite
@CosmoLite
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)
image.png
Nijiko Yonskai
@nijikokun
@/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.
CodeThunder
@jalbou
Hello there
Kovalchuk Evgeny
@Senpos
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
@SimonFredrich
Hello, how do I use unirest inside a little html project?