code: private HttpEntity<?> createHttpEntity(HttpHeaders httpHeaders, Object payload, HttpMethod method) {
          if (httpMethodSupportsBody(method)) {
              return new HttpEntity<>(payload, httpHeaders);
          } else {
              return new HttpEntity<>(httpHeaders);
          }
      }
docs: Composes a HttpEntity based on the given parameters
  @param httpHeaders The headers to set
  @param payload The payload to set
  @param method The HttpMethod to use
  @return The composed HttpEntitiy