httpclient和resttemplate哪个性能好些

2025-04-14 19:30:03
推荐回答(1个)
回答1:

restTemplate.postForObject两个方法

1、restTemplate.postForObject(url, null, String.class, params);

Example:

UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel}/bookings/{booking}");
Map uriVariables = new HashMap();