Github user FlorianHockmann commented on the issue:

    https://github.com/apache/tinkerpop/pull/928
  
    @deejvince: Did you see [the integration 
test](https://github.com/apache/tinkerpop/blob/master/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientTests.cs#L233)
 added with this PR?
    
    The relevant part is basically this:
    ```cs
    var webSocketConfiguration =
                    new Action<ClientWebSocketOptions>(options =>
                    {
                        options.UseDefaultCredentials = false;
                        options.KeepAliveInterval = 
TimeSpan.FromMilliseconds(11);
                    });
    var gremlinClient = new GremlinClient(gremlinServer,
                    webSocketConfiguration: webSocketConfiguration);
    ```
    
    The `Action` you provide will be called for every `ClientWebSocket` created 
by the driver of Gremlin.Net.
    
    I haven't tested that specifically, but it should also be possible to set a 
request header like this:
    ```cs
    var webSocketConfiguration =
                    new Action<ClientWebSocketOptions>(options =>
                    {
                        options.SetRequestHeader("Authorization", "Bearer " + 
token);
                    });
    ```
    
    Please report back if that doesn't work.


---

Reply via email to