resttemplate Questions
2
Solved
I'm trying to access getter methods on my MyModelClass but my code is returning List<LinkedHashMap> instead of List<MyModelClass>. This is my code.
List<MyModelClass> myModelClass...
Stifling asked 19/10, 2013 at 7:0
7
Solved
I try to do a simple rest call with springs resttemplate:
private void doLogout(String endpointUrl, String sessionId) {
template.getForObject("http://{enpointUrl}?method=logout&session={sessi...
Katabatic asked 2/1, 2014 at 14:52
5
Solved
With Spring-boot 1.5.10.RELEASE, I am getting response.body as null.
Here is how I am using RestTemplate
RestTemplate restTemplate = new RestTemplate();
List<ClientHttpRequestInterceptor>...
Granthem asked 2/3, 2018 at 4:32
2
I have a Java desktop client application that uploads files to a REST service.
All calls to the REST service are handled using the Spring RestTemplate class.
I'm looking to implement a progress b...
Modify asked 14/12, 2012 at 17:5
8
I know this may be simple. However, I just can't get it to work.
So I am trying to use Spring RestTemplate to map my JSON data. I have following JSON response from a rest call.
{
"message":"ok",...
Dysprosium asked 6/3, 2015 at 6:59
3
In my restful webservice, in case of bad request (5xx) or 4xx respose codes, I write a custom header "x-app-err-id" to the response.
On the client side, I use exchange method of RestTemplate to ma...
Eleni asked 24/10, 2011 at 15:26
2
I am trying capture the response of an HTTP request made by my java client code. The response has a content-type of application/pdf. In the logs I can see that the server sent a response in
Objec...
Freeze asked 26/8, 2014 at 16:13
4
Hi I'm using the spring RestTemplate for calling a REST API. The API can be very slow or even offline. My application is building the cache by sending thousands of requests one after the other. The...
Treble asked 2/9, 2015 at 11:55
6
We use Spring to implement REST controller, for example:
@Controller
@RequestMapping("/myservice")
public class MyController {
@RequestMapping(value = "foo", method = RequestMethod.GET)
public ...
Ventris asked 12/5, 2013 at 21:23
7
Solved
I am trying to pass path param and query params in a URL but I am getting a weird error. Below is the code.
String url = "http://test.com/Services/rest/{id}/Identifier"
Map<String, S...
Whitewood asked 14/3, 2016 at 21:52
3
Solved
I'm trying to implement a Rest call to an authentication server using RestTemplate and log the response in case the server returns an exception. In order to do this, I used a ResponseEntityExceptio...
Thermosphere asked 28/2, 2019 at 18:25
2
Solved
We have a Spring-Boot (2.3.10.RELEASE) based application which calls many REST APIs using RestTemplate.
In case, any REST API returns any 4xx or 5xx HTTP error code along with message body, complet...
Poinciana asked 7/10, 2021 at 5:10
9
Solved
I am using RestTemplate to make an HTTP call to our service which returns a simple JSON response. I don't need to parse that JSON at all. I just need to return whatever I am getting back from that ...
Lucarne asked 21/4, 2014 at 20:14
15
I didn't find any example how to solve my problem, so I want to ask you for help. I can't simply send POST request using RestTemplate object in JSON
Every time I get:
org.springframework.web.cl...
Doble asked 2/11, 2010 at 8:29
4
I'm trying to to access a RestAPI-Endpoint with the help of Spring's RestTemplate
public List<Transaction> getTransactions() {
// only a 24h token for the sandbox, so not security critical
...
Leopoldoleor asked 12/10, 2018 at 18:0
6
Is it possible to create with RestTemplateBuilder an instance of RestTemplate with just the bearer header and token?
I know i can use RestTemplate exchange and set inside the HttpEntity my headers...
Dedans asked 27/1, 2020 at 10:15
4
I want to configure my Spring @MVC stub application's Spring RestTemplate with SSL for communicate to REST base https application, that deployed on Tomcat server (Spring 3, Tomcat 7). I have done u...
Multifold asked 27/10, 2011 at 9:20
4
Solved
I am currently writing unit test for below method
@Autowired
private RequestConfig requestConfig;
@Autowired
private RetryTemplate retryTemplate;
public ResponseEntity<String> makeGetServi...
Cher asked 27/2, 2019 at 22:16
2
Solved
What is the most convenient way to influence the priority of the message converters Spring applies when POSTing with RestTemplate?
Use case: I want to ensure a given entity is POSTed as JSON rathe...
Landtag asked 19/12, 2017 at 20:21
4
Solved
I want to convert the following (working) curl snippet to a RestTemplate call:
curl -i -X POST -d "[email protected]" https://app.example.com/hr/email
How do I pass the email parameter corr...
Henkel asked 14/7, 2016 at 10:59
3
Solved
How can I send a GET request using the Spring RestTemplate?
Other questions have used POST, but I need to use GET.
When I run this, the program continues to work, but it seems that the network is c...
Fossa asked 27/5, 2013 at 23:10
2
I am trying to cover all of the rest template calls in my class for exception handling. Using Custom exception handling with error handler in spring boot application.
For this i have created a res...
Strader asked 12/4, 2019 at 12:54
3
Solved
I am trying to pass a spring MultipartFile from my application to a microservice, and using RestTemplate, as the following,
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaT...
Along asked 7/4, 2020 at 9:6
3
I am writing a Rest client to post JSON data using Spring RestTemplate.
Using POSTMAN and following JSON data in body get the response correctly-
{
"InCode":"test",
"Name":"This is test",
"Emai...
Telephone asked 20/5, 2016 at 6:48
6
Solved
I want to set the value of the Accept: in a request I am making using Spring's RestTemplate.
Here is my Spring request handling code
@RequestMapping(
value= "/uom_matrix_save_or_edit",
method ...
Sustentacular asked 8/10, 2013 at 3:45
© 2022 - 2024 — McMap. All rights reserved.