Questions tagged [rest-client]

REST Client is an open-source HTTP and REST client for Ruby.

REST Client is an open-source HTTP and REST client for Ruby originally created by Adam Wiggins and now maintained by Andy Brody. It was inspired by Sinatra's micro-framework style of specifying actions: get, put, post, delete.

Github

The code repository and issue tracker can be found on github:

https://github.com/rest-client/rest-client

Resources

940 questions
2
votes
1 answer

REST Client: Error was: HAPI-1861: Failed to parse JSON encoded FHIR content: Unexpected character ('@' (code 64)): expected a valid value

I am trying to understand FHIR fundamentals and I have installed REST Client in VS code to post the following ### Variable declaration ### @host = https://hapi.fhir.org/baseR4 @contentType = application/json ### Post Patient ### # @name…
One Developer
  • 99
  • 5
  • 43
  • 103
2
votes
1 answer

How to set Content-Type Header in Java MicroProfile RestClient during method call

I am currently using the Java MicroProfile RestClient and have following problem: Backend provides an api to receive binary files Backend would be happy to receive a Content-Type header containing the Mime-Type of the binary file I am not able to…
Sevenby7
  • 21
  • 2
2
votes
1 answer

How to apply a default value into specflow step definition table even if the user does not provide the column name

How to apply a default value into the specflow step definition table even if the user does not provide the column name? Example: This is my feature file @regression @add-a-new-cat Feature: Add a new cat As a User I should be able to add a cat …
2
votes
2 answers

Quarkus Restclient throws javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type and qualifiers [@Any]

I am trying to integrate a second rest client to my micro service and am getting an error. @RegisterRestClient public interface { @POST @Path("/example") Response postStuff(DataBean data); } The injection class does it as…
helplessMax
  • 63
  • 2
  • 6
2
votes
2 answers

How to insert GEOJSON using Aerospike Rest Client

A record is successfully inserted using this query: INSERT INTO test.geoPSGC (PK,PSGC,NAME,COORDINATES) VALUES ("PH042103059","PH042103059","P.F. ESPIRITU VIII", GEOJSON('{"type": "Polygon", "coordinates":…
Don
  • 163
  • 12
2
votes
2 answers

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 doesn't recognize or can't parse the payload…
Aloisio
  • 51
  • 1
  • 3
2
votes
2 answers

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 documentation and it states that The request execution…
Adriaan
  • 806
  • 7
  • 24
2
votes
1 answer

Quarkus rest client parameter query encoding

I have this quarkus rest api: @ApplicationScoped @RegisterRestClient(configKey = "s-api") @RegisterProvider(LoggingFilter.class) public interface MyClientAdapter { @GET @Produces(MediaType.TEXT_PLAIN) String search(@QueryParam("lodis")…
nano_nano
  • 12,351
  • 8
  • 55
  • 83
2
votes
0 answers

Mocking a chained rest client call (Mockito)

I'm trying to figure my way around mocking this guy. I have Mockito blessed through Surefire: @Inject private javax.ws.rs.client.Client client; ... String response = client.target(url).request(MediaType.APPLICATION_JSON).post(Entity.entity(request,…
2
votes
0 answers

How to send graphql Request using RestClient in Rails

Hi I have a Graphql Request which I want to send using RestClient, can anyone please give me suggestion How can I do it I want something like in this form response = RestClient.post("http://localhost:3000/graphql", default_headers,payload) Because…
Puja Garg
  • 251
  • 3
  • 11
2
votes
1 answer

vscode plugin REST Client

### @id = 5ead67de63c073fdd86ccff5 POST http://localhost:3000/products/{{id}} Content-Type: application/json [ { "propName": "name", "value": "CampbellTomatoJuice" } ] When I use postman for the above no issues, but vscode…
2
votes
1 answer

How could I handle rest-client 500 error response and keep scraping through my loop?

I need to scrape 10k URLs from this website and some of them are out of service (I think... it's an error that does not return the JSON I'm looking for, so rest-client returns 500 Internal Server error in my program) Error syntax:…
2
votes
2 answers

RestEasy : javax.ws.rs.ProcessingException: GZIP input exceeds max size: 10000000

I am trying to read a large response. I am getting this error "javax.ws.rs.ProcessingException: RESTEASY003357: GZIP input exceeds max size: 10000000" We are calling a rest service using jaxrs WebTarget. Everything working fine if the response is…
Ramesh
  • 1,872
  • 2
  • 20
  • 33
2
votes
1 answer

Rest-Client gem RoR, Getting SSL wrong version error

I want to build a cli ruby app which sends requests to Rails API server. I wanted to use rest-client gem to do that. Every time i use RestClient.post I get the following error SSL_connect returned=1 errno=0 state=error: wrong version number…
aJEFFIKa
  • 23
  • 1
  • 3
2
votes
1 answer

Why Rails response takes one minute in development mode?

Can't understand why my rails app become make response ultra-slow - in 1 minute! As i see total time Rails should be: Views 0.2ms + ActiveRecord 219.5ms + Solr 379.7ms = 599.4ms But it takes 62615ms, where is it spending the rest of time…