Class HttpHandlerUtil

  • public class HttpHandlerUtil
    extends Object
    Provides methods shared by the HTTP handlers.
    Stephen Mallette (
    • Constructor Detail

      • HttpHandlerUtil

        public HttpHandlerUtil()
    • Method Detail

      • getRequestMessageFromHttpRequest

        public static RequestMessage getRequestMessageFromHttpRequest​(io.netty.handler.codec.http.FullHttpRequest request,
                                                                      Map<String,​MessageSerializer<?>> serializers)
                                                               throws SerializationException
        Convert a http request into a RequestMessage. There are 2 payload types options here. 1. existing intended to use with curl, postman, etc. by users both GET and POST Content-Type header can be empty or application/json Accept header can be any, most useful can be application/json, text/plain, application/vnd.gremlin-v3.0+json and application/vnd.gremlin-v3.0+json;types=false Request body example: { "gremlin": "g.V()" } 2. experimental payload with serialized RequestMessage intended for drivers/GLV's. Support both gremlin and bytecode queries. only POST Content-Type is defined by used serializer, expected type GraphSON application/vnd.gremlin-v3.0+json or GraphBinary application/vnd.graphbinary-v1.0. Untyped GraphSON is not supported, it can't deserialize bytecode Accept header can be any. Request body contains serialized RequestMessage
      • getRequestMessageFromHttpRequest

        public static RequestMessage getRequestMessageFromHttpRequest​(io.netty.handler.codec.http.FullHttpRequest request)
        Convert a http request into a RequestMessage.