Springcloud中的RestTemplate

RestTemplate restTemplate = new RestTemplate();
        restTemplate.delete("");
        restTemplate.put("","");
        restTemplate.postForEntity(",","",String.class);
        restTemplate.postForLocation("","");


get方法

@Override
	@Nullable
	public <T> T getForObject(String url, Class<T> responseType, Map<String, ?> uriVariables) throws RestClientException 

@Override
	@Nullable
	public <T> T getForObject(String url, Class<T> responseType, Object... uriVariables) throws RestClientException {
		
@Override
	@Nullable
	public <T> T getForObject(URI url, Class<T> responseType) throws RestClientException {
		

psot

@Override
	@Nullable
	public URI postForLocation(String url, @Nullable Object request, Object... uriVariables)
			throws RestClientException {
@Override
	@Nullable
	public URI postForLocation(String url, @Nullable Object request, Map<String, ?> uriVariables)
			throws RestClientException {
	@Override
	@Nullable
	public URI postForLocation(URI url, @Nullable Object request) throws RestClientException {

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章