980 questions
1
vote
1
answer
29
views
Spring - RestClient - Http to POJO when information is only in headers?
I have a server that I make rest calls towards that returns part of its information through headers instead of putting it all in a body, sadly I do not own the code that runs on the server so I can't ...
Best practices
1
vote
3
replies
61
views
How to configure Spring RestClient to automatically add a query parameter to every request?
I have a Spring Boot application that calls an external API.
The API requires an API key to be passed as a query parameter, for example:
https://api.example.com/data?apikey=123
I want to avoid ...
0
votes
0
answers
43
views
VS Code REST Client: variables not expanding inside JSONPath filter
I’m using the VS Code REST Client extension to call the Power BI REST API and then extract values from a previous response using JSONPath.
I want to select a report by name using a variable ({{...
0
votes
1
answer
116
views
Springboot RestClient 404 not found though address does exist
I am trying to make a Call by the org.springframework.web.client.RestClient.
The address/resource does definetly exist GET http://localhost:8080/someResource.
It is retrievable by simple call in the ...
0
votes
0
answers
54
views
springboot3.2.5 restclient occasionally delays about 3 seconds
When I use springboot3.2.5 restclient to call an API, occasionally there is a gap of about 3 seconds from the time the request is sent to the time the request is received by the receiver.This is the ...
0
votes
0
answers
57
views
@RestClientTest request not being executed/detected
I have a service that calls a third-party API with RestClient using a default config, when trying to test it using @RestClientTest the mock server does not detect any incoming requests, I am not sure ...
0
votes
0
answers
167
views
RestClient changes x-api-key to X-Api-Key, causing 403 response
I'm trying to make an HTTP request using RestClient in Rails, but I'm encountering an issue with the headers. Here is the code I'm using:
headers = {
'Content-Type' => 'application/json',
'...
0
votes
0
answers
99
views
Is there a way to configure proxy based on hostname in PoolingHttpClientConnectionManager httpclient5
I am trying to configure my spring restclient in a way that if hostname has "internal" in its name then do not go via proxy and if it is something else then go via proxy.
We are currently ...
0
votes
1
answer
252
views
Spring Boot web RestClient test
I got implementation like this:
@Service
class AbcService {
private final RestClient client;
public AbcService(@Value("url") final String url) {
this.restClient = RestClient.builder()...
0
votes
0
answers
51
views
how to force close socket in RestClient
What should I do if I want to disconnect while still receiving responses from RestClient?
(java, kotlin)
val result = restClient().get()
.uri("")
.exchange { : HttpRequest, ...
0
votes
1
answer
118
views
Post Power BI Rest API statement within rest client visual code
I am using REST CLIENT extension for visual code and trying to post report into workspace
using this APIs: Microsoft Documentation for Posting Report File to Workspace
with GET statement there is no ...
2
votes
2
answers
271
views
how to make Spring boot Dynamic bean creation?
Given a set of properties in an application.yaml
restClient:
clients:
client1:
connection-timeout: PT10s
response-timeout: PT10s
user-agent: test
...
0
votes
0
answers
33
views
Quarkus ClassNotFoundException for DTO in Shared Library After Idle Period
I’m building a multi-service architecture with a shared Gradle setup. Here's how my project is structured:
Root Gradle Project: Manages shared dependencies and configurations.
Child Gradle Projects: ...
1
vote
0
answers
133
views
Visual Studio Code REST Client plugin how to refer to settings.json variable
I want to refer to settings.json file variables in settings.json file using REST CLIENT extension in visual code. Below my variables in settings.json:
{
"rest-client.environmentVariables": {
...
0
votes
2
answers
330
views
RestClient is not propgating TraceID
I recently switched to RestClient from RestTemplate and using SpringBoot 3.2.7 and Java 21 in my project. I noticed when microservice1 is calling microservice2 then the TraceId is not getting ...
1
vote
0
answers
399
views
Unable to use auto-configured MockRestServiceServer since MockServerRestClientCustomizer has been bound to more than one RestClient | two Beans
I created a TestRestClient and it worked perfectly, but if I inject another RestClient bean into my RestClientConfiguration class, it works, but in the tests, it gives the following error: Unable to ...
0
votes
1
answer
714
views
C# HttpClient MultipartFormDataContent send integer values
I have been testing this API and can only get it working when I use this RestClient. This RestClient wants to install about 20 other packages into my project so I would like to get it working with the ...
1
vote
0
answers
36
views
How can i read the body even a IOException or ResourceAccessException occcur in Spring RestClient?
I am using RestClient (not Template!) to send a request to another server. Because of a missing header i get a 400 Error but can not read the body. When i make the request with postman i get a body &...
0
votes
1
answer
278
views
Spring RestCleint.RequestBodyUriSpec body mocking returns null
Mocking RestClient.RequestBodyUriSpec body. Mocking returns null when used in RestClient web service.
Test case as below -
package org.mytest.tests;
import org.junit.jupiter.api.Test;
import org....
1
vote
1
answer
628
views
Quarkus RestClient doesn't forward multipart file uploads—files received count is 0
I am working with a Quarkus-based service that accepts multiple file uploads and forwards them to another (Quarkus)service via a RestClient. The issue I am facing is that, although the files are ...
0
votes
0
answers
102
views
export restclient request to cUrl
I qm using restclient to call a webapi, but need to have its cUrl equivalent.
var curl = httpClient.GenerateCurlInString(httpRequestMessage);
I need something like this:
var curl = httpClient....
1
vote
1
answer
952
views
How properly configure RestClient OAuth2ClientHttpRequestInterceptor in Integration-Test
Hi Spring Security Community,
is there a good approach/ best practice for disabling the new OAuth2ClientHttpRequestInterceptor in Integration-Tests, which has been integrated in this PR for Release 6....
1
vote
2
answers
3k
views
Spring boot 3 RestClient does't catch TimeoutException
I'm using Spring Boot 3 (3.3.1) and Java 21.
When using the new RestClient I encountered two problems:
the onStatus(...) method does not work if error 408 (timeoutexception) occurs. And as a result, ...
1
vote
1
answer
165
views
How can I enable HTTPS support for localhost?
I am new to Helidon, and we want our Java app to support HTTPS for REST calls. I have a sample controller that returns some string, and my app currently runs on http://localhost:8080. How can I enable ...
0
votes
1
answer
138
views
unable to get the emails from outlook by using graph api - getting NullReferenceException: Object reference not set to an instance of an object error
unable to get the emails from outlook by using graph api get method
public List<Message> GetAllMails()
{
List<Message> mails = new List<Message>();
//var ...
1
vote
1
answer
3k
views
Virtual Threads Not Being Used in Spring Boot 3.2 Application Despite Configuration
I'm currently working on a Spring Boot 3.2 application with Java 21, and I've enabled virtual threads for improved performance. However, I’m noticing that many platform threads are still being created,...
5
votes
0
answers
796
views
Update environment variable based on response body in .http file (vscode and rest-client)
I want to override the local.token value in settings.json.
I can read the body and update a local variable but this means I need to run the token request and manually update the environment variable ...
0
votes
0
answers
222
views
Delphi 11 RestClient Request fails with some errors
I've tryed to send 2 Values to an RestServer and get only errors. It does't matter if i try the bold Lines instead of the italic lines.
var JSONValue: TJsonObject;
begin
RESTClient1.CleanupInstance;...
0
votes
0
answers
46
views
Getting groovyx.net.http.EncoderRegistry.encodeForm() Error
I need to make a REST API PUT call in Groovy using RESTClient and json as the Content Type. This is what my code looks like:
def params = ["content": listOfSymbols.join(","), "...
0
votes
1
answer
591
views
Spring 6.1 RestClient JUnit Mock Test
I have a Spring 6.1 RestClient:
@Service
@RequiredArgsConstructor
public class ProductServiceClient {
@Value("${spring.client.product.url}")
private final String baseUrl;
private ...
0
votes
0
answers
76
views
Error to restClient & HttpWebRequest- The request was aborted: Could not create SSL/TLS secure channel
In my ASP.NET MVC project (.Net Framework 4.7.2), I am consuming as API which is hosted on another server developed by vendor. Whenever I tried to hit same API through code, I am getting an error ...
2
votes
1
answer
2k
views
How to log Spring Boot 3 httpRestClient error response.body as readable string?
Prior to asking this, I am already tried using:
log.error("fail {} ", ex.getResponseBodyAsString());
I am already attaching .defaultStatusHandler() on the restClient. which is not really ...
0
votes
0
answers
62
views
VS Code Rest Client doesn't work with Nuxt 3 server routes
I created a simple Nuxt app npx nuxi@latest init
I then created an api route. i.e. a file test.ts in server/api with the basic stub
export default defineEventHandler(async (event) => {
// ... Do ...
0
votes
1
answer
204
views
Quarkus RestClient DNS failover on multiple A type IP addresses?
I am using Quarkus RestClient and I encountered some problems.
I have an URL, which is internally resolved to 4 different IP addresses (data and IP addresses are pseudonymized in this example):
[user@...
0
votes
0
answers
2k
views
How to Generate a Padded Random Number as a Variable in Insomnia REST Client
I'm working with the Insomnia REST client and I'm trying to generate a zero-padded random number between 000 and 999 to use as part of a request. I want to create an environment variable that ...
1
vote
1
answer
3k
views
cannot import name 'RESTClient' from 'polygon'
While i trying to conect polygon API using python:
from polygon import RESTClient
and it would result:
cannot import name 'RESTClient' from 'polygon'
But I dont know why it isn't work. It originaly ...
1
vote
0
answers
383
views
I/O error on POST request for API: HTTP/1.1 header parser received no bytes
I am calling a client API where I am getting the below error first time.
org.springframework.web.client.ResourceAccessException: I/O error on POST request for URL: HTTP/1.1 header parser received no ...
3
votes
1
answer
8k
views
Provider for jakarta.ws.rs.client.ClientBuilder cannot be found
I am trying to build a RESTful client with jakarta 10.0.0
ClientBuilder.newClient() is failing with this error message:
Exception in thread "main" java.lang.RuntimeException: java.lang....
0
votes
1
answer
2k
views
Using RestClient, i don't know how implement proxy, need to declare the port and host
I want to implement proxy in host and port,
i tryed increment in to url but give errors
i used
spring.cloud.bootstrap.proxy.host=proxy1.lan.bnm.md
spring.cloud.bootstrap.proxy.port=8080
but its not ...
1
vote
0
answers
364
views
SpringBoot RestClient TraceId
I switched from RestTemplate to RestClient in my application and since switching I’m unable to get the same TraceId between services. Is anyone else having this same problem?
I tried updating ...
4
votes
1
answer
3k
views
How to transmit Multipart file object into Spring web RestClient post method
I have two microservices:
One for user authentication (authentication microservice).
One for handling video file storage (videoStore microService).
Process :
("/create") belongs to ...
0
votes
1
answer
800
views
What is the most efficient way to call rest service multiple times in a loop
I need to call an api endpoint multiple times in a loop. While the connection path remains same one parameter changes in every call. I have written it like below.
I am opening the connection at the ...
0
votes
1
answer
1k
views
Does springframework.web.client RestClient handles @requestParam [duplicate]
I try to do this:
@GetMapping("/db/video/getall")
public ResponseEntity<List<VideoDto>> getAllVideo(@RequestParam String ownerEmail) {
return ....;
}
import ...
0
votes
1
answer
1k
views
How to decompress gzip response body using Spring RestClient?
The oficial docs don't mention how to configure RestClient to decompress a gzip response. By default it doesn't seem to decompress it like WebClient does.
2
votes
1
answer
753
views
VSCode REST client : how to get now date
I am doing some request with rest client extension in VScode
I would like to know if there is a way to get the current date and to use it in a request
It would be something like
# CreateLesson
# @name ...
1
vote
0
answers
308
views
How to prevent rest-client from opening a http response in split screen in VsCode?
I'm trying to change the settings of the VSCode extension: Rest-Client (https://marketplace.visualstudio.com/items?itemName=humao.rest-client).
My goal would be to open http responses simply in new ...
3
votes
2
answers
2k
views
VSCode REST client - how to get value from array in response
I'm trying to grab the value "141" from the response using the expression
@second = {{getall.response.body.[1].id}}
HTTP/1.1 200 OK
Connection: close
Content-Type: application/json; charset=...
1
vote
0
answers
87
views
In Ruby, how to send multiple files in single request using RESTClient
I've been have a issue where I tried to use the RestClient lib to send two or more files to Kotlin Service endpoint where this controller needs to receive a files attributes that is a List<...
3
votes
0
answers
1k
views
Getting "No RestClientBuilderResolver implementation found!" when using RestClientBuilder
I'm encountering an issue when attempting to use RestClientBuilder in my Java code to build a client with MicroProfile. I'm receiving the error message "No RestClientBuilderResolver ...
-1
votes
1
answer
1k
views
Seeking Enhancements for RestClient Configuration [closed]
I'm using RestClient for upstream communication and would like to add some enhancements to make it more robust. Here's my current setup:
SimpleClientHttpRequestFactory factory = new ...