Skip to content

ToHeaders and ToJSON (or ToString) override each other #90

Answered by mtyurt
mtyurt asked this question in Support
Discussion options

You must be logged in to vote

Okay, found the answer on my own. I should have used CopyHeaders

requests.URL("/simple").
Bearer(token).
ContentType("application/json").
ToJSON(&response).
CopyHeaders(headers).
Method("GET").
Fetch(ctx)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mtyurt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant