No body for REST API Call Node on GET method
This commit is contained in:
		
							parent
							
								
									4ab3db85fc
								
							
						
					
					
						commit
						449845fe51
					
				@ -174,7 +174,13 @@ public class TbHttpClient {
 | 
			
		||||
        String endpointUrl = TbNodeUtils.processPattern(config.getRestEndpointUrlPattern(), msg);
 | 
			
		||||
        HttpHeaders headers = prepareHeaders(msg);
 | 
			
		||||
        HttpMethod method = HttpMethod.valueOf(config.getRequestMethod());
 | 
			
		||||
        HttpEntity<String> entity = new HttpEntity<>(msg.getData(), headers);
 | 
			
		||||
        HttpEntity<String> entity;
 | 
			
		||||
        if(HttpMethod.GET.equals(method) || HttpMethod.HEAD.equals(method) ||
 | 
			
		||||
            HttpMethod.OPTIONS.equals(method) || HttpMethod.TRACE.equals(method)) {
 | 
			
		||||
            entity = new HttpEntity<>(headers);
 | 
			
		||||
        } else {
 | 
			
		||||
            entity = new HttpEntity<>(msg.getData(), headers);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        ListenableFuture<ResponseEntity<String>> future = httpClient.exchange(
 | 
			
		||||
                endpointUrl, method, entity, String.class);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user