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
0
votes
1 answer

How can I send a HTTP Post from a C# Asp.Net method?

I would like to query a dictionary API from my C# method. Here's the specification for what is needed: POST /DictService/DictService.asmx/DefineInDict HTTP/1.1 Host: services.aonaware.com Content-Type:…
Alan2
  • 23,493
  • 79
  • 256
  • 450
0
votes
1 answer

Unirest Api Post call (error - not indexable)

I have a curl request to an api thus: curl xx.yy.zz:8080 -X POST --data "bb=True&alg=egbis&image_url=https://someurl.com/someimage.jpg" and this returns valid json results back. Now trying to call this from a C# application using Unirestthus: …
Santino
  • 776
  • 2
  • 11
  • 29
0
votes
1 answer

The type arguments for method 'HttpRequest.asJson()' cannot be inferred

I am trying to run a C# console program: namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Task> response =…
Samantha J T Star
  • 30,952
  • 84
  • 245
  • 427
0
votes
0 answers

Unirest PHP: getting an error with a library file

I have downloaded unirest library from here and extracted it to the folder with my site. I've put this piece of code on the page:
0
votes
1 answer

ios, convert UIImage to a MultipartFile

I want to send an image to web server which has RestFul api's. This is what I have in my backend. First RequestParam ecgImage is the image. @RequestMapping(value = "/ecgimage", method = RequestMethod.POST) public void…
Drunken Daddy
  • 7,326
  • 14
  • 70
  • 104
0
votes
2 answers

UNIRest: switch to a new ViewController on an Asynchronous HTTP response

I'm using the UNIRest library and I'm trying to switch to another ViewController on the response of an HTTP GET method. [[UNIRest get:^(UNISimpleRequest *request) { [request setUrl:GEtFamilyMembers]; }]…
Drunken Daddy
  • 7,326
  • 14
  • 70
  • 104
0
votes
0 answers

How to play the response I got to convert text into speech using voicerss?

import unirest response = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=secret", headers={ "X-Mashape-Key": "secret", "Content-Type": "application/x-www-form-urlencoded" }, params={ "c": "mp3", "f":…
Rokio
  • 11
  • 3
0
votes
1 answer

Elasticsearch bulk API returning 400 error in Java

I tried a lot of things to check why is it showing a malformed request. Refer to this question to properly format my request body. Parent specification in elasticsearch for first node Here is my code. I am using Unirest API to send requests. In the…
Amriteya
  • 1,118
  • 15
  • 37
0
votes
2 answers

org.apache.http.client-4.3.6: java.lang.NoClassDefFoundError: org.apache.http.impl.conn.PoolingHttpClientConnectionManager

I am working in Android. I am trying to install dependencies (without maven) for the Unirest library. I have added the exact versions of the dependencies, namely: httpclient 4.3.6, httpmime 4.3.6, httpasyncclient 4.0.2. However, i am still getting…
Abdul Wasae
  • 3,614
  • 4
  • 34
  • 56
0
votes
1 answer

Unirest form fields not being sent correctly from Jython

I'm using java Unirest (1.4.7) implementation from both Jython (2.7) and Java (7) code. I've encountered an issue when sending http requests from Jython code : Here is the Jython code : import com.mashape.unirest.http.Unirest as Unirest; r =…
Khopa
  • 2,062
  • 1
  • 23
  • 22
0
votes
2 answers

Trying to fetch JSON with Android using Unirest

Trying to use this "Words API" in an android application which only seems to accept requests using Unirest. Request example for the definition of "incredible" (specified by api): HttpResponse response =…
Jonathan Laliberte
  • 2,672
  • 4
  • 19
  • 44
0
votes
0 answers

Javascript - Error: require is not defined

I recently installed unirest. In their documentation they provided the following piece of code to test unirest: var unirest = require('unirest'); unirest.post('http://mockbin.com/request') .header('Accept', 'application/json') .send({…
0
votes
0 answers

How to install Unirest without composer PHP?

I followed instructions on Github, still I am getting this error Class Unirest Not found I followed this link https://github.com/Mashape/unirest-java
Mavrick
  • 35
  • 3
0
votes
1 answer

Unirest-JAVA Wont Query

I am having trouble getting Unirest to query a site via JSON. Code: AuthLIB.java: import java.io.FileWriter; import java.io.IOException; import java.io.*; import java.net.*; import java.util.*; import com.mashape.unirest.http.*; import…
0
votes
1 answer

Unable To Install Unirest via Python

I keep trying to install unirest, but I'm unable to do it. I'm using python 3.4 because I couldn't figure out how to install it on 2.7. Even though I'm in the 2.7 directory, I think it is running python 3.4. Does anyone know how to troubleshoot…
king
  • 1,304
  • 3
  • 23
  • 43