Questions tagged [unirest]

Unirest is a set of lightweight HTTP libraries available in PHP, Ruby, Python, Java, Objective-C.

Unirest is a set of lightweight HTTP libraries available in PHP, Ruby, Python, Java, Objective-C.

More Details

354 questions
-1
votes
1 answer

post request in Unirest Java result on a 302 http result

I m training my self on creating a restful server and a desktop java based client. my backend is Spring Boot based, I have the following controller : @RestController @RequestMapping(NiveauAccessController.URL) public class NiveauAccessController…
-1
votes
1 answer

Unirest no class found error

I'm trying to use the unirest library to make some requests, but when I try to use it I get the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpRequest at …
tanaka
  • 401
  • 1
  • 4
  • 13
-1
votes
1 answer

Java: Post-request to login on remote website, which using javascript on login-button

I'm using Unirest with Java, trying to login on a remote webpage. I can see with Chrome developer tools and HTTP Trace that the site is using POST with XMLHttpRequest in header: POST [site]/Services/UserService.asmx/Authenticate Origin: [site]…
-1
votes
1 answer

How do I get a nested unirest accessing 2 different api url's to both render on a page, or at least the 2nd unirest request to render?

router.post('/', function(req, res, next) { console.log('req.body from root', req.body) var tuneName = req.body.name // what is entered by user var tune = encodeURIComponent(tuneName) console.log('tune', tune) …
-2
votes
1 answer

Sending a POST request to API with localhost

I am sending an image to an API using my localhost address but for some reason it doesn't identify the image. It works fine if I use links on google. The code looks something like this: unirest.post(requestString) .header("X-RapidAPI-Key",…
Roger
  • 597
  • 9
  • 32
-2
votes
1 answer

What JSON parsing is simpliest?

For example, I have some REST API testing task. I took Unirest framework, and what I have got some JSON extractors, protected int extractStatus (HttpResponse login) { return login.getStatus(); } protected String extractError…
Boris
  • 125
  • 1
  • 1
  • 11
-2
votes
1 answer

curl_setopt_array(): CURLOPT_FOLLOWLOCATION

Warning: curl_setopt_array(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set . I am trying to install Unirest and when i executed php file i got this error message
Mavrick
  • 35
  • 3
-3
votes
2 answers

Converting from request to unirest gives status 400 bad request

I am trying to post json data to a url that is executed as shown below in cURL The snapshot below is my code using the request module in Node.js that works perfectly I am trying to covert the above code written using the request module into…
PirateApp
  • 5,433
  • 4
  • 57
  • 90
-3
votes
1 answer

How to use Unirest php ? Need to Link Site2Sms in Mashape?

I am pure beginner to APIs.. I am doing a project and think about including Site2Sms Api to send messages. The API I wish to use is in the link. The API is calling requests with Unirest PHP Library.. Can someone give a sample page or code snippet…
1 2 3
23
24