Class asyncresttemplate is Spring's central class for asynchronous client-side HTTP access.
Questions tagged [asyncresttemplate]
29 questions
0
votes
2 answers
get external url from application.properties with pathvariable
I have a situation were i need to call an external endpoint. I am using spring boot. I have placed the endpoint in the application.properties file and used a placeholder for the parameter I need to change like so:…

Aquaman
- 43
- 5
0
votes
2 answers
REST API Design - Async REST Client Vs Async REST API
I already have REST API (for System-to-System communication) which takes lot of time to process.
I want to have asynchronous processing. I see two options here:
To make the API itself as asynchronous, where it returns a LOCATION header giving…

Kumar
- 1,536
- 2
- 23
- 33
0
votes
1 answer
Spring Boot controller preventing multiple inserts upon quick successive requests in mongodb
I have a REST API to calculate something upon a request, and if the same request is made again, return the result from the cache, which consist of documents saved in MongoDB. To know if two request is the same, I am hashing some relevant fields in…

uylmz
- 1,480
- 2
- 23
- 44
0
votes
0 answers
Need to add a response to a ListenableFuture>
I have this code:
AsyncRestTemplate asyncRestTemplate = new AsyncRestTemplate();
asyncRestTemplate.setMessageConverters(new ArrayList>() {{
add(new ByteArrayHttpMessageConverter());
add(new…

David_Garcia
- 622
- 7
- 15
0
votes
1 answer
AsyncRestTemplate '#' sign encoding in query parameter
I am using AsyncRestTemplate to make an API call to Google Maps from a Springboot 1.5.2 service. Unfortunately, some of my search strings contain a pound/hashtag sign #
and are not getting encoded properly in my search parameters. I am using the…

alejandrogiron
- 544
- 2
- 7
- 18
0
votes
1 answer
Provide Response to user who call the RestApi without waiting for the microservice rest call using spring boot
I am developing a web API for an application. I had got a situation where the user will send a few data to my API. After processing the data I have to forward a few data to other API.
But I don't want to concentrate on the response from the second…

HARISH
- 193
- 4
- 14
0
votes
1 answer
How to run the same asyn task for each element of my array list?
I have a list that contains elements and i want to send each element of my list seperatly to a local database server using RestTemplate in a AsynkTask.If i specify which element i want to send, i can send it easily and works with my AsyncTask but i…

AmYne Gaïeb
- 130
- 3
- 13
0
votes
1 answer
REST Service call with JAR as payload
How to read JAR file from src/main/resources folder & use it as payload for REST service call from Spring boot application using RestTemplate
Any code snippet would be helpful
Thanks

Sriram
- 33
- 4
0
votes
1 answer
How to increase timeout AsyncRestTemplate class?
I have developed some async web services with spring framework and REST, I have consumed it from a client created with spring class AsyncRestTemplate. Class return an object ListenableFuture> (with the method getForEntity), which…

J. Abel
- 890
- 3
- 17
- 38
0
votes
1 answer
Spring AsyncResttemplate HTTPs (SSL) service call
I am using Spring asyncresttempate to call multiple services simultaneously. Those services are exposed via SSL. could you please let me know how to use the SSL certificate and AsyncResttemplate to call the services asynchronously? We can use…

Debopam
- 3,198
- 6
- 41
- 72
0
votes
1 answer
How to use Apache CachingHttpAsyncClient with Spring AsyncRestTemplate?
Is it possible to use CachingHttpAsyncClient with AsyncRestTemplate? HttpComponentsAsyncClientHttpRequestFactory expects a CloseableHttpAsyncClient but CachingHttpAsyncClient does not extend it.

sfussenegger
- 35,575
- 15
- 95
- 119
0
votes
0 answers
How do I create an AsyncRestTemplate in Spring with caching?
I would like to create an AsyncRestTemplate which also has Http Caching enabled...
From what I've read, it seems as though I need to explicitly enable Http Caching by creating a AsyncHttpClient (How do I create an async caching http…

Nick Grealy
- 24,216
- 9
- 104
- 119
0
votes
1 answer
AsyncRestTemplate not calling DELETE endpoint
I need to call rest endpoint with delete method in fire and forget fashion. I don't care about result.
I am trying to use AsyncRestTemplate but server side is not being called.
If I switch to RestTemplate everything works.
Then I have noticed that…

kqr
- 406
- 8
- 12
-1
votes
1 answer
How to call rest API in the loop
I want to call the third party API multiple times using the RestTemplate(for each customer id I have to call REST API) currently I have written like below and its working fine but it's taking time because there are many customers I'd and calling API…

reddy
- 79
- 1
- 11