Questions tagged [unirest-java]

15 questions
12
votes
1 answer

CompletableFuture with timeout

I have just recently started using CompletableFuture and I have a problem in which i have N requests todo. Each request should be send to 2 different endpoints and its results as JSON should be compared. Since I have tons of requests todo and i dont…
Vml11
  • 361
  • 1
  • 2
  • 11
1
vote
1 answer

Convert JsonNode into Java POJO

I have this piece of code: HttpResponse response = Unirest.post("https://json.islandia.com/v1/martorell") .basicAuth("624823", "8f1addd21a09d6b95eaefa8d60p4c05") .field("day", "28") …
Nuñito Calzada
  • 4,394
  • 47
  • 174
  • 301
1
vote
1 answer

Jira cloud REST create issue and issuelink

I'm trying to create an issue, issuelink and copy attachment from triggered issue at the same time using scriptrunner. For now, the code below are able to create issue and attachment, but I can not link the issue I created, does someone ever deal…
Carlos
  • 11
  • 1
1
vote
0 answers

JAVA - How to build a client for OAuth 1.0 REST API with signature method as HMAC-SHA256?

I'm able to consume APIs (OAuth 1.0 Authorization & signature method as HMAC-SHA256) in POSTMAN, but not working JAVA (maven project). Generated code from POSTMAN with OkHttp & Unirest libraries, both are not working. They give the following…
Pankaj
  • 360
  • 5
  • 22
1
vote
1 answer

Java Unirest sends POST request with empty JSON to server running on localhost but works fine when sending the same request to cloud server?

I am building an agent in Java which has to solve games using a planner. The planner that I am using runs as a service on the cloud, and thus anybody can send HTTP requests to it and get a response. I have to send to it a JSON with the following…
Volokin
  • 71
  • 1
  • 7
0
votes
1 answer

Parsing response from Unirest and extracting tag value

I am calling a rest end point in Java using Unirest. The response is a JSON message which is complex and contains multiple levels inside. I need to extract the value of a specific tag "eventDefinationId" from the response message. However, that is…
0
votes
1 answer

Is Unirest java library responses encrypted?

I'm using unirest library to implement http responses like get,post,put and delete. As HTTP doesn't uses encryption - I think unirest doesn't encrypt. Correct me if I'm wrong. Any explaination appreciated.
0
votes
0 answers

Why does Power Query handle data from two (identical?) .csv files differently

I need help to understand a problem regarding a set of power queries that was written by a former colleague of mine. I have very basic knowledge of power query but intermediate understanding of scripting in general. A previous colleague of mine…
Alfonso
  • 21
  • 6
0
votes
0 answers

Unirest is not returning expected result on PUT request [Java]

I am trying using an end point for updating a record, now that is working fine for postman, but it is not working for Unirest, as I have used everything. My code is like this: public static void updateTrialLength()throws IOException { …
Taimoor Pasha
  • 192
  • 2
  • 3
  • 16
0
votes
1 answer

java.lang.NoClassDefFoundError: java/sql/Time Exception when trying to send a PATCH request

I'm trying to make an application which updates an Entity. Server is made using Spring Boot. I'm trying to send a PATCH request using Unirest, but I'm getting this exception: Exception in thread "JavaFX Application Thread"…
0
votes
0 answers

Get List of all ids using unirest in Java

My JSON is like following : [ { "start_time": "06:00:00", "end_time": "21:00:00", "id": 1845, "number": "", "name": "Default Store", "companyId": 731, "address": null, "phone1":…
Taimoor Pasha
  • 192
  • 2
  • 3
  • 16
0
votes
1 answer

Post an 'x-www-form-urlencoded' entity with Java Unirest

I using java Unirest to call my api. but now I need to post an object but with x-www-form-urlencoded, I using this code: public static void main(String[] args) { Unirest.config().setObjectMapper(new JacksonObjectMapper()); …
Fabio Ebner
  • 2,613
  • 16
  • 50
  • 77
0
votes
1 answer

How to send file in unirest

How to send file in unirest. I tried sending through my code. it does not work but when I send it from postman it works fine. File myfi = new File("/Users/xxxxxxx/Downloads/test.png"); MultipartBody request =…
Sobhit Sharma
  • 697
  • 14
  • 45
0
votes
1 answer

JAVA alternative for CURLOPT_INTERFACE

I have a Java application running on my server, which send's request to external servers. My server has 5 different IP Addresses. how can i make each request with one different IP Address? As instance, i want to send first request with 192.168.1.2…
ASHKARAN
  • 365
  • 1
  • 13
0
votes
1 answer

Unirest Java Client : kong.unirest.UnirestException: org.apache.http.client.ClientProtocolException

I am using Unirest Java client which I am using like below to connect to external API: public static String loginAsAdmin(String authenticationURL , String userName , String password){ Map creds = new HashMap<>(); …
Pramod S. Nikam
  • 4,271
  • 4
  • 38
  • 62