[ 
https://issues.apache.org/jira/browse/TINKERPOP-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17326547#comment-17326547
 ] 

ASF GitHub Bot commented on TINKERPOP-2547:
-------------------------------------------

spmallette commented on a change in pull request #1419:
URL: https://github.com/apache/tinkerpop/pull/1419#discussion_r617552165



##########
File path: 
gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/RequestInterceptor.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.tinkerpop.gremlin.driver;
+
+import org.apache.tinkerpop.gremlin.driver.handler.RequestInterceptorHandler;
+
+import java.util.function.UnaryOperator;
+
+/**
+ * This function is called when the {@link RequestInterceptorHandler} 
encounters an object passing through it.
+ * Implementers will need to detect the type of object to determine if they 
will interact with it or not. Typically,
+ * objects will be a {@code FullHttpRequest} in the case of a websocket 
handshake or some form of

Review comment:
       I was trying to generalize this functionality rather than pin it 
particularly to `FullHttpRequest` and the initial handshake. We could say 
that's not useful and that only the first HTTP request matters I guess. This 
feature was largely your idea so I'll modify it to work the way you'd 
envisioned.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Provide an option to supply a callback before request submission
> ----------------------------------------------------------------
>
>                 Key: TINKERPOP-2547
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2547
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: driver
>    Affects Versions: 3.4.10
>            Reporter: Stephen Mallette
>            Priority: Minor
>
> Provide a callback that allows the user to modify a request before it gets 
> sent to the server. This change would allow support for custom authentication 
> methods and similar functionality.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to