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

Add the ability to set custom headers #298

Open
5 tasks done
batazor opened this issue Oct 15, 2023 · 1 comment
Open
5 tasks done

Add the ability to set custom headers #298

batazor opened this issue Oct 15, 2023 · 1 comment
Labels
feat New feature or request.

Comments

@batazor
Copy link

batazor commented Oct 15, 2023

Preflight checklist

Ory Network Project

No response

Describe your problem

In order to link my trace-id to events in ory/kratos I need to add W3C headers.

Currently there is no way to add headers to requests

Describe your ideal solution

Add method .SetHeaders(key, value) or .SetHeaders(map[string]string)

Workarounds or alternatives

As an option is the ability to pass the query context .Execute(ctx context.Context) and check for the presence of trace-span-id

Version

github.com/ory/client-go v1.2.11

Additional Context

No response

@batazor batazor added the feat New feature or request. label Oct 15, 2023
@batazor
Copy link
Author

batazor commented Oct 15, 2023

As an alternative, we can add this method to the template by analogy with the `.cookie' method

func (r FrontendApiToSessionRequest) SetHeader(key, value string) FrontendApiToSessionRequest {
	r.SetHeader(key, value)
	return r
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant