private JsonObject createRequest(Map<String,Object> headers,String uri,HttpMethod method,JsonObject payload){
  JsonObject request=new JsonObject();
  JsonArray jsonHeaders=new JsonArray();
  headers.forEach(null);
  request.put("headers",jsonHeaders);
  request.put("uri",uri);
  request.put("method",method.toString());
  request.put("payload",payload);
  return request;
}

private JsonObject createRequest ( Map < String , Object > headers , String uri , HttpMethod method , JsonObject payload ) { JsonObject request = new JsonObject ( ) ; JsonArray jsonHeaders = new JsonArray ( ) ; headers . forEach ( null ) ; request . put ( "headers" , jsonHeaders ) ; request . put ( "uri" , uri ) ; request . put ( "method" , method . toString ( ) ) ; request . put ( "payload" , payload ) ; return request ; }
creates a new request with the given parameters .
