Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
43 views

Ruby's rest-client isn't replicating my CURL request, and I don't know what I'm doing any differently

Here's my CURL request: curl -X POST -u apikey:secret 'https://numbers.api.sinch.com/v1/projects/{project ID}/availableNumbers:rentAny' \ -d '{ "regionCode": "US", "...
Joey's user avatar
  • 3
0 votes
1 answer
238 views

How to view actual header values sent after a request?

How do you see the actual headers that was sent in a request after you send out a request in Rest Client? I can see the response completely, but it does not show the actual headers that were sent out. ...
Niner's user avatar
  • 2,186
0 votes
1 answer
711 views

sending json and files to Azure Function

I am trying to upload files to an Azure Function, but I also need a JSON object to add addition context and I am struggling. I am not sure if its the restClient in vs code that the issue or if its the ...
EnenDaveyBoy's user avatar
0 votes
1 answer
2k views

How to send javascript date object with POST request in REST CLIENT (vs code extension)?

I want to make a post request using REST CLIENT extension in VS Code. How can I send javascript new Date() object or moment() or dayjs() objects with the request? I tried changing Content-type: ...
Prathmesh's user avatar
0 votes
0 answers
171 views

Jersey exception mapper is not being invoked from Filter class

I have one Jersey(version 1.19) Exception Mapper class to send custom error to rest client. @Provider class GenericExceptionMapper extends ExceptionMapper[Exception] { private val logger = ...
Prashanta Kumar Pal's user avatar
0 votes
1 answer
820 views

Certificate has expired error in Insomnia REST client

I'm using Insomnia REST client to work with api's. I want to connect to Git on gitlab/github but I have this error: Error: certificate has expired at TLSSocket.onConnectSecure (_tls_wrap.js:1501:...
Mahdi Javaheri's user avatar
1 vote
0 answers
156 views

RestClient - Rails 6 - Bad Request whole time

I try to implement przelewy24 - Polish payment system. I connect like this: resource = RestClient::Resource.new('https://sandbox.przelewy24.pl/api/v1/transaction/register', :user => 'aaaa', :...
Wordica's user avatar
  • 2,597
2 votes
2 answers
8k views

RestClient Error javax.ws.rs.WebApplicationException: Unknown error, status code 404

I'm trying to request from a Quarkus's api to Jersey's api, but Jersey API returns a 404 error: javax.ws.rs.WebApplicationException: Unknown error, status code 404 It looks like quarkus rest client ...
Aloisio 's user avatar
0 votes
0 answers
69 views

Rest request not working when device time is ahead

I'm using a ResClient request to get a device's status from a URL, but if the device has the time ahead from the server, it doesn't bring up the new status. Example: a camera that has the clock ahead ...
Felipe Silverio's user avatar
0 votes
1 answer
2k views

How to loop RestClient request passing id and then appending to response

The API I am using to grab data from is very limited. The only way I can get data out is via a GET request passing the identifier of the record I require. Issue is I could have multiple ID's I need ...
skippy's user avatar
  • 172
1 vote
0 answers
292 views

To get JWT Token -getting 401 Unauthorized but working from Postman

Can someone please help to understand if any wrong with the below code or what can be done to resolve the same? These services working from POSTMAN but getting error thru code Getting error : ...
Avinash Nivangune's user avatar
2 votes
2 answers
3k views

TRestRequest.Execute exits thread when responses code is 300 or higher

I need to check specific status codes from a RestResponse however the RestRequest.Execute seems to generate a EHTTPProtocolException when the status codes are not 200. I did take a look at the ...
Adriaan's user avatar
  • 806
0 votes
1 answer
1k views

java.lang.NoClassDefFoundError: javax/net/ssl/HostnameVerifier

I am trying to execute rest api using HTTP client in java I am using ant project so using below dependencies in module.xml <module xmlns="urn:jboss:module:1.3" name="kv.http-client&...
Vishal Yadav's user avatar
1 vote
1 answer
556 views

Can't populate components field in JIRA using ComponentRestClient in Java

I've been trying different ways to populate components field while creating JIRA using JiraRestClient in java and somehow not able to do that. Following is one of the approaches I tried - public ...
Anita's user avatar
  • 93
0 votes
1 answer
5k views

java SSLHandshakeException No subject alternative names matching IP address

As a restful client, I can successfully connect to the server using the Postman software without any certification or security setting. (I receive the correct response from the server) But when I call ...
SM. Hosseini's user avatar
0 votes
0 answers
573 views

RestClient.post response generating "error groovyx.net.http.ResponseParseException : OK"

I' am using groovy to consume a POST Rest api : here is my code : import groovyx.net.http.RESTClient @Grab (group = 'org.codehaus.groovy.modules.http-builder', module = 'http-builder', version ...
user avatar
4 votes
0 answers
1k views

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed DURING response

I have spring reactive a micro-service which call another micro-service to get list of products, but it keep failing with the error reactor.netty.http.client.PrematureCloseException: Connection ...
Melad Basilius's user avatar
0 votes
0 answers
517 views

How to use RestClient - Ruby for my situation

I'm trying to use RestClient with Ruby. I got a curl from Postman, but when I try generate my code in Ruby I had a problem. curl --location --request GET 'https://url?param1=value1&param2=value2' ...
Ricardo's user avatar
  • 23
1 vote
0 answers
780 views

Ruby rest-client gem always causing OpenTimeout

I'm trying to use the API of the Bureau of Labor Statistics, and trying to use the API using curl works perfectly and returns the results almost immediately: curl -X GET "https://api.bls.gov/...
Aditya Chanana's user avatar
0 votes
1 answer
257 views

Call external API using Mule SDK

I am trying to implement a Mule 4.x policy using Mule SDK. In doing so, I need to call an external API in the policy operations implementation. The result returned by the external API response would ...
techjourneyman's user avatar
1 vote
1 answer
247 views

Getting StatusCode: UnsupportedMediaType when using RestClient with bearer token

Getting StatusCode: UnsupportedMediaType for file upload. I am using RestClient with bearer token I got the bearer token successfully, but when sending the JSON to the API I'm getting the exception ...
SASIDHAR.C's user avatar
1 vote
0 answers
689 views

error after adding grails-datastore-rest-client plug-in

Using grails version :4.0.0.RC2 groovy version :2.5.6 dependencies { developmentOnly("org.springframework.boot:spring-boot-devtools") compile "org.springframework.boot:spring-boot-...
user2020563's user avatar
0 votes
1 answer
396 views

Use Django Rest API From Any Origin

I have a REST API implemented using Django DRF. My API is working just fine when used from my-domain.com, however I would like the API to be accessible from any origin. I have implemented CORS/CSRF ...
user avatar
0 votes
1 answer
411 views

How do i make a self hosted wcf accept REST/JSON?

I have read here on SO in several posts that it is possible to create a selfhosted wcf REST service that accepts JSON as input. But i cant get it to work, im banging my head against the same rock over ...
merger's user avatar
  • 734
0 votes
1 answer
2k views

RestClient post request in ruby on rails

RestClient post request I tried post request couple ways @user = {name: 'xxxxxx', email: '[email protected]', password: 'qwertyqqq'} RestClient.post 'http://localhost:4123/api/users?token=<token&...
Ganesh Raju's user avatar
1 vote
0 answers
138 views

How to set up a Rest client call of a put method of a spring.boot implemented rest interface?

My controller: @Slf4j @RestController @RequestMapping("/technology") @RequiredArgsConstructor public class MyController { private final MyService myService; @PutMapping("/enable/{technology}") ...
Greg's user avatar
  • 1,367
0 votes
2 answers
544 views

Why 400 error code in POST call using Jersey client

I am calling a post request using Jersey rest client which contains no request body but contains authorization header. I am always getting 400 error. I tried from postman i got 200 response. Here is ...
Usman Shabir's user avatar
0 votes
1 answer
235 views

Postman POST works properly; Ruby POST does not. How do I debug the difference?

I need to do a POST request for an API that takes a JSON payload that contains a nested stringified JSON object. I do a GET request to get the string, parse it (twice!) to get the hash, modify one ...
Ned's user avatar
  • 236
0 votes
1 answer
113 views

RESTFul Client in Jersey is generating a new shiro (for authentication) session each time

I have a rest api that has a login resource for authentication using shiro. When calling the login from postMan client for example then trying to perform an action, I monitor the shiro session on rest ...
zbeedatm's user avatar
  • 649
1 vote
0 answers
293 views

Token expiry of Rest Sharp API

Working on Rest Sharp API automation framework, I have to run a script for 8-10 hrs to do some task. But the token expires after 30 minutes with the message: Unauthorized: { "Message":"Expired ...
Shirsh's user avatar
  • 73
0 votes
1 answer
287 views

JAVA - Two clients java with SSL connection, first need certificate, second doesn't need certificate

I have a Java project built with myEclipse, Java 1.7. Project call two clients that make Rest request on two different SSL web services end-point. .. public void Example() { .. CallFirstClient(); ...
wikimt's user avatar
  • 71
0 votes
1 answer
236 views

how can I get a correct response from a rest API?

I want to send a request to a rest API and get response and show it on the form. the API documentation says that I should use my token in bearer to Authorization in the header. I've used RestSharp ...
Persian LionKing's user avatar
-2 votes
2 answers
644 views

Ruby create array from api response

How to create array or store rest api response to array rest API response {"functionality":[],"subfunctionality": [{"id":1,"title":"a1","description":"sample}, {"id":2,"title":"a2","description":...
testerBDD's user avatar
  • 255
0 votes
1 answer
25 views

Request body being changed? Or not translated correctly

I am sending a post request from a Rails app, to an ExpressJS app. In postman it works, however when i send the post request from the Rails app, the params look fine on the rails end but then when the ...
Cannon Collins's user avatar
1 vote
1 answer
530 views

ruby rest-client content in the header / payload

My request from the swagger is curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ "version": "v15" \ }' 'https://XXX.XX.XXX.XXX/tools/v1/...
testerBDD's user avatar
  • 255
0 votes
2 answers
2k views

How to Create REST Client, the response should be come in JSP page?

I developed server side web services developed with rest. My Code working fine while checking with POSTMAN application. But i want to get the response for all the CRUD operation in JSP page. The every ...
Veerendar Chary Munigadapa's user avatar
6 votes
2 answers
19k views

Getting ssl.SSLHandshakeException when using REST client with header but works fine with PostMan

I have an external REST resource with below details: The URL: abc.com/orders (the domain is with https) I need to pass UserID as an HTTP header with key "user" value is "abcd" This would return an ...
J. Doe's user avatar
  • 63
0 votes
1 answer
766 views

Retrieve JSON from Rest Client Request trough Service To Web Application

I've made a REST client sending http request to a server, receiving reply with JSON message: public class TestClass { public static String getData() { String output = null; try { ...
Asras's user avatar
  • 1
2 votes
2 answers
725 views

How to rescue RestClient API calls in development mode when no Internet available?

In my Rails app I am making various API calls like this one: class SearchFacebook FALLBACK_STARS = 5.0 def self.call begin url = "https://graph.facebook.com/v2.12/#{FACEBOOK_PAGE_ID}" ...
Tintin81's user avatar
  • 10.2k
0 votes
1 answer
315 views

I am trying to raise a POST request to generate bearer token through RestClient in rails, but getting 403 Forbidden as status code

require 'base64' require 'rest-client' require 'json' key="**************************" secret="****************************************" str="#{key}"+":"+"#{secret}" encoded_str= Base64.encode64(str)....
Ayush Baranwal's user avatar
0 votes
1 answer
8k views

REST Client Basic Authorization to a REST API

I have a question. I have a Basic Authorization value that is Base64Encoded that looks something like this "aHZjYnN4NXJ4bXV6OmplWHN1Wl....", I am just wondering where I can put this value into the ...
Justin W's user avatar
2 votes
2 answers
5k views

Use Yii2 REST client to consume Yii2 REST API

I have created a REST API using the Yii2 documentation. It seems to be working fine as I can use curl like this: curl -i "https://example.com/api/v3/user" \ -H "Accept:application/json" \ -H ...
Mr Goobri's user avatar
  • 1,469
3 votes
1 answer
6k views

Rest-Client HK2 failure detected

Im developing a "ManageYourAnime/Manga/Movies/TvShows/Whatever"-Program. A friend had the idea/need and im now making it for him as it´s a good opportunity to learn things and produce something ...
Max's user avatar
  • 31
1 vote
1 answer
2k views

ServiceNow Rest API call

I am trying to use a between operator as below, curl -k "https://instance.service-now.com/api/now/table/My_Table?sysparm_query=sys_updated_on>javascript:gs.dateGenerate('2017-12-06','14:45:23')^...
Pavan_Obj's user avatar
  • 1,129
1 vote
1 answer
13k views

Setting dynamic baseUrl for Get Request RestClient

I am wanting to dynamically change my baseUrl for my RestClient depending on what token is being run. This is for the deputy roster systems attempting to get Roster data out but cannot figure out how ...
Josh Fletcher's user avatar
0 votes
3 answers
945 views

Xamarin Android httpClient.getAsync causes Exception

When i call public static async Task<User> GetUserAsync(string name) { try { using (var client = new HttpClient()) { client....
Steini's user avatar
  • 485
0 votes
0 answers
518 views

how to setup rest api client in codeigniter ,spark and curl are not working,how to get data with basic aut in rest api

Please help me to setup rest API client in Codeigniter, i did setup but its showing error of spark and curl, i searched in the internet ,got to know that spark and curl are not using now a days , so ...
khasim saheb's user avatar
0 votes
1 answer
878 views

Converting a PHP cURL request to Ruby

I'm attempting to send a NewSubmission to a CRM called LionDesk. The sample NewSubmission code is written in PHP and I need to convert this into Ruby code since I will be integrating this into an ...
Conner Hiatt's user avatar
3 votes
2 answers
2k views

how to get ticket details of multiple ticket IDs through OTRS REST URL

Currently i used this URL for single ticket ID: http:///otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/Ticket/2020?UserLogin=abc&Password=abc123&DynamicFields=1 How can i ...
im_mangesh's user avatar
1 vote
0 answers
58 views

Extend the time duration of Rest Client of a restful service

When we create a rest client and set a timeout by creating webtarget. Can we update / extend the timeout of a webtarget or rest client connection?
Viv's user avatar
  • 69