resttemplate Questions

3

I use Spring Boot and faced the following issue while keeping the long running connection to 3rd party REST service: org.springframework.web.client.ResourceAccessException: I/O error on POST reque...
Copula asked 14/8, 2018 at 16:37

4

I'm having a problem using Spring restTemplate. For now i'm sending a PUT request for a restful service and that restful service send me back important informations in response. The question is t...
Uredium asked 3/6, 2013 at 14:30

4

Solved

I have a web service call through which zip files can be uploaded. The files are then forwarded to another service for storage, unzipping, etc. For now the file is stored on the file system, then a...
Richellericher asked 3/4, 2013 at 8:0

3

Solved

Sorry if this was asked before, but I didn't find a matching question. I have an application that performs api calls to other services. I'm thinking of using WebClient over RestTemplate as it's adv...
Microclimatology asked 15/2, 2022 at 14:17

2

I receive this warning on my app. I am reading rfidtags from about 30 readers at the same time. Each time a tag comes in I am hitting the database to see if it's in there. I have a REST API that I ...
Marielamariele asked 28/2, 2019 at 16:43

7

I'm trying to mock a restTemplate.exchange method through mockito but it always returns a null value no matter what i return through mock , even if i throw an exception: this is the actual code : ...
Arissa asked 9/4, 2019 at 10:28

3

Solved

I have a test in which I want to pass three parameters: String Enum Array of Strings Example: @ParameterizedTest @CsvSource({ "/path/to/first/file.xlsx, FIRST, {THIRD PARAMETER SHOULD BE ARR...
Subphylum asked 20/10, 2017 at 12:49

2

Solved

I am trying to know how long a HttpConnection is kept alive when inactive, before a new connection is created via Spring rest Template. I looked at default Connection Time-Out and Read Time-Out par...
Gelatinate asked 3/2, 2016 at 18:37

5

Solved

There is a RestFull method that return a List of Menu objects public ResponseEntity<List<Menu>> getMenus() { .. } But I don't know how to get them from the RestTemplate, getting the ...
Statolatry asked 26/5, 2018 at 8:32

10

Solved

I'm having problems posting JSON with UTF-8 encoding using RestTemplate. Default encoding for JSON is UTF-8 so the media type shouldn't even contain the charset. I have tried to put charset in the ...
Impropriate asked 1/4, 2015 at 13:43

12

Solved

To use generic types with Spring RestTemplate we need to use ParameterizedTypeReference (Unable to get a generic ResponseEntity<T> where T is a generic class "SomeClass<SomeGenericTyp...
Crossing asked 24/2, 2014 at 12:5

12

Solved

I am completely new in RestTemplate and basically in the REST APIs also. I want to retrieve some data in my application via Jira REST API, but getting back 401 Unauthorised. Found and article on ji...
Vulnerary asked 20/2, 2014 at 21:44

3

Solved

I am tried to call two rest API synchronously. However, after completing first rest api call, second call throw the exception as shown in below.I have also tried with some httpClientConnectionPooli...
Fillender asked 12/4, 2016 at 10:40

4

Solved

I was trying to set headers to my rest client but every time I have to write webclient.get().uri("blah-blah") .header("key1", "value1") .header("key2", "value2")... How can I set all headers ...

2

Solved

I'm developing a Spring Boot WebFlux application for IoT real time data visualization. I have a Flux which simulates data coming from a device, and I want that upon websocket connection establishe...

7

Solved

Update 02/05/2018 (about 4 years later)...I tested this again as people have been upvoting my question/answer and Sotirios Delimanolis is correct that I should not have to write the code in my answ...
Rhyner asked 13/6, 2014 at 15:21

2

Solved

I can't fetch JSONObject directly, this code works: RestTemplate restTemplate = new RestTemplate(); String str = restTemplate.getForObject("http://127.0.0.1:8888/books", String.class); JSONObject ...
Inweave asked 25/1, 2017 at 11:1

6

Solved

Just wondering if RestTemplate out of the box uses connection pooling or does it simply establish a new connection each time ?
Hoelscher asked 25/5, 2017 at 19:57

3

Facing issue while making call to retrieve a json response and parse it. [ { "name": "john doe", "age": "24", "address": "{\"state\&q...
Whiting asked 29/5, 2020 at 20:35

3

I have a REST resource that gets a RestTemplateBuilder injected to build a RestTemplate: public MyClass(final RestTemplateBuilder restTemplateBuilder) { this.restTemplate = restTemplateBuilder.bu...
Royalroyalist asked 6/3, 2018 at 10:28

6

Solved

I'm using the Java Spring Resttemplate for getting a json via a get request. The JSON I'm getting has instead of special character slike ü ö ä or ß some weird stuff. So I guess somethings wrong wit...
Swordtail asked 22/12, 2014 at 13:35

2

Solved

I wanted to call a post API with form URL encoded header. Here's my code var data = SnapEngChatRequest( widgetId = widgetId, visitorMessage = "Test" ) val headers = HttpHeaders() headers.s...
Featured asked 23/4, 2019 at 13:38

15

Solved

I have two questions: How to map a list of JSON objects using Spring RestTemplate. How to map nested JSON objects. I am trying to consume https://bitpay.com/api/rates, by following the tutorial...
Angel asked 15/5, 2014 at 9:17

2

Requirement is to consume a webservice and persist in database. I wrote a stand alone class with Resttemplate and it works. I used same url and same authentication mechanism + spring boot, war dep...
Windowlight asked 25/1, 2018 at 14:38

7

Solved

I am working on Spring Boot Eureka Client Application with Ribbon Load Balancer. I have two instances of the server registered with Eureka with the name "TEST". On the client side, I have the foll...

© 2022 - 2024 — McMap. All rights reserved.