public class RestTemplateRequest<T> extends Object
| 构造器和说明 |
|---|
RestTemplateRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> org.springframework.http.ResponseEntity<T> |
exchange(String url,
int type,
org.springframework.http.HttpEntity<?> requestEntity,
Class<T> responseClass,
Map<String,?> params)
exchange
|
static <T> org.springframework.http.ResponseEntity<T> |
exchange(String url,
int type,
org.springframework.http.HttpEntity<?> requestEntity,
org.springframework.core.ParameterizedTypeReference<T> responseType,
Map<String,?> params)
exchange
|
static <T> org.springframework.http.ResponseEntity<T> |
getForEntity(String url,
Class<T> responseClass,
Map<String,?> params)
GET请求
|
static <T> T |
getForObject(String url,
Class<T> responseClass,
Map<String,?> params)
GET请求
|
static <T> org.springframework.http.ResponseEntity<T> |
postForEntity(String url,
Object request,
Class<T> responseClass,
Map<String,?> params)
POST请求
|
static <T> T |
postForObject(String url,
Object request,
Class<T> responseClass,
Map<String,?> params)
POST请求
|
public static <T> T postForObject(String url, Object request, Class<T> responseClass, Map<String,?> params)
T - url - request - responseClass - params - public static <T> org.springframework.http.ResponseEntity<T> postForEntity(String url, Object request, Class<T> responseClass, Map<String,?> params)
T - url - request - responseClass - params - public static <T> T getForObject(String url, Class<T> responseClass, Map<String,?> params)
T - url - responseClass - params - public static <T> org.springframework.http.ResponseEntity<T> getForEntity(String url, Class<T> responseClass, Map<String,?> params)
T - url - responseClass - params - public static <T> org.springframework.http.ResponseEntity<T> exchange(String url, int type, org.springframework.http.HttpEntity<?> requestEntity, Class<T> responseClass, Map<String,?> params)
T - url - type - 请求类型 0-GET 1-POSTrequestEntity - responseClass - params - public static <T> org.springframework.http.ResponseEntity<T> exchange(String url, int type, org.springframework.http.HttpEntity<?> requestEntity, org.springframework.core.ParameterizedTypeReference<T> responseType, Map<String,?> params)
T - url - type - 请求类型 0-GET 1-POSTrequestEntity - responseType - params - Copyright © 2018. All rights reserved.