Questions tagged [superagent]

410 questions
2
votes
1 answer

React Dropzone Multiple Image Upload With Tastypie

I have tried to upload multiple image using react-dropzone and tastypie.I am not able to store the images to the server using tastypie.The files are shown on console and also on django console the name of file is shown. Models.py class…
pri
  • 620
  • 2
  • 9
  • 20
2
votes
2 answers

Superagent multiple files attachment

Im trying to upload several files at once via superagent. I know the docs say to use multiple .attach(), but i can't get it to work dynamically. Is it possible to loop trough an array and repeat .attach()? Or is this done in another way? Something…
Daniel Storch
  • 327
  • 1
  • 3
  • 15
2
votes
0 answers

Problems fetching data from a SSL based Server

I had a Backend which wasn´t SSL based (http:.....). Everything worked just great. I am developing an Android and iOS App with React Native. I used superagent as my request client. So after i had changed my backend to SSL (https:...) i get the…
BigPun86
  • 2,480
  • 2
  • 25
  • 49
2
votes
0 answers

Request Retry and Error Handling CORS with superagent

I am writing an extension on superagent to allow for requests to be retried when they fail for certain cases. This works well for all cases except for when it is a CORS failure. Is it possible to differentiate a CORS network failure as opposed to an…
Mike D
  • 252
  • 1
  • 9
2
votes
1 answer

Receiving POST request data using Superagent and Express 4

Express -v : 4.13.3 Superagent -v : 1.4 function to send the POST request from the front-end of my app: search: () => { request.post('/api/search') .set('Content-Type', 'application/json') .send({hello: 'hello w'}) .end((err,…
httpNick
  • 2,524
  • 1
  • 22
  • 34
2
votes
2 answers

Node Express 4 send a response after multiple API calls

I am building a NodeJS server using Express4. I use this server as a middleman between frontend angular app and 3rd party API. I created a certain path that my frontend app requests and I wish on that path to call the API multiple times and merge…
StrikoMirko
  • 415
  • 4
  • 17
2
votes
3 answers

Create cancellable promise in ECMAScript 6

I am using native Promises for making ajax requests with superagent like this. function callAPI() { return new Promise(function () { request.get('/some.json') .end(function (error, res) { resolve(res); …
Salman
  • 9,299
  • 6
  • 40
  • 73
2
votes
2 answers

Streaming data events aren't registered

I'm using superagent to receive a notifications stream from a server require('superagent') .post('www.streaming.example.com') .type('application/json') .send({ foo: 'bar' }) .on('data', function(chunk) { console.log('chunk:' + chunk); //…
sakovias
  • 1,356
  • 1
  • 17
  • 26
2
votes
1 answer

How to use superagent in browser to post a string as a file

I am trying to post a string as a file from the browser, as described in this SO question But I want to use superagent to do this. I tried the following: var request = require('superagent'); var boundary =…
FriC
  • 786
  • 10
  • 14
2
votes
2 answers

Superagent: PUT-ing multipart form data

Is it possible to do a PUT request with multipart form data? With Superagent I would expect the following to work, but it doesn't. var request = Request .put("http://localhost:8080/upload_file") .field("name", file.name) .field("size",…
niftygrifty
  • 3,452
  • 2
  • 28
  • 49
2
votes
2 answers

Cannot read property 'parent' of undefined - Node.js

I was trying to employ superagent and cheerio to crawl data from kijiji for learning, while I got an error of "Cannot read property 'parent' of undefined". (I tried craigslist which was fine). It happened after I got the correct results "object". It…
Xie Zhijie
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

Piping STDOUT of spawn process into superagent upload

I'm struggling to work out how to take the output of a spawned child process and feed that output into a multipart mime upload. Here is what I have that as far as I can tell should work var request = require('superagent'); var spawn =…
hash-bang
  • 492
  • 1
  • 4
  • 9
2
votes
1 answer

Why jmeter recording does not capture Basic Authorization related Http headers

I am using JMeter Proxy to record my integration tests being run via node.js with superagent & superagent-proxy. The tests record initially under the listener and show accurate and expected results, requests, and responses. But, my problem lies in…
gjw80
  • 1,058
  • 4
  • 18
  • 36
2
votes
2 answers

testing local https server with mocha/superagent

So I see there was a pull request a few months ago for superagent to allow you to specify the CA in a request. It does not appear that the docs were updated to reflect this change, so I can't seem to figure out how to do it. I am trying to test on…
MonkRocker
  • 309
  • 2
  • 11
2
votes
1 answer

Session storage for authentication using SailsJS/Node, Mocha, Supertest

I have a SailsJS setup and am using Mocha/Supertest/Superagent combination to run unit tests. I have searched around and read about supertest and how it now extends superagent.agent('url') in order to store sessions and cookies. I know that my…
cgaubuchon
  • 45
  • 1
  • 7