类的使用
org.springframework.http.RequestEntity
使用RequestEntity的程序包 程序包 说明 org.springframework.http Contains a basic abstraction over client/server-side HTTP.org.springframework.web.client Core package of the client-side web support.org.springframework.http中RequestEntity的使用
返回RequestEntity的org.springframework.http中的方法 修饰符和类型 方法 说明 <T> RequestEntity<T>RequestEntity.BodyBuilder. body(T body)Set the body of the request entity and build the RequestEntity.<T> RequestEntity<T>RequestEntity.BodyBuilder. body(T body, Type type)Set the body and type of the request entity and build the RequestEntity.RequestEntity<Void>RequestEntity.HeadersBuilder. build()Builds the request entity with no body.org.springframework.web.client中RequestEntity的使用
参数类型为RequestEntity的org.springframework.web.client中的方法 修饰符和类型 方法 说明 <T> ResponseEntity<T>RestOperations. exchange(RequestEntity<?> requestEntity, Class<T> responseType)Execute the request specified in the givenRequestEntityand return the response asResponseEntity.<T> ResponseEntity<T>RestOperations. exchange(RequestEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)Execute the request specified in the givenRequestEntityand return the response asResponseEntity.<T> ResponseEntity<T>RestTemplate. exchange(RequestEntity<?> requestEntity, Class<T> responseType)<T> ResponseEntity<T>RestTemplate. exchange(RequestEntity<?> requestEntity, ParameterizedTypeReference<T> responseType)