Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to set headers in first http1.1 request before connection upgrade for TransportWebSocketLink? #463

Open
agufagit opened this issue Jun 7, 2024 · 0 comments

Comments

@agufagit
Copy link

agufagit commented Jun 7, 2024

how to set headers in first http1.1 request before connection upgrade for TransportWebSocketLink? For authentication purpose

It seems like there is no options for that

TransportWsClientOptions(
    socketMaker: WebSocketMaker.url(() => "http://0.0.0.0/graphql"),
    connectionParams: () async {
      // payload
      String? token = await getAccessToken();

      return {
        "headers": {
          "Authorization": "Bearer $token",
        },
        "Authorization": "Bearer $token",
      };
    },
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant