private HttpEntity < ? > createHttpEntity ( HttpHeaders httpHeaders , Object payload , HttpMethod method ) { if ( httpMethodSupportsBody ( method ) ) { return new HttpEntity <> ( payload , httpHeaders ) ; } else { return new HttpEntity <> ( httpHeaders ) ; } }
Composes a HttpEntity based on the given parameters