question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Headers not sticking

See original GitHub issue

I don’t know if I’m doing something wrong here but I can’t seem to get my header changes to stick.

Here’s what I’m doing:

Manager.instance.baseHeaders = mapOf(Pair("Content-Type", "application/json"))
val (request, response, data) = url.httpPost(listOf(Pair("emailAddress", email))).responseString()

However, when I debug the Manager class’ request method (around line 57) the request’s headers are set to:

"Content-Type" -> "application/x-www-form-urlencoded"
"Accept-Encoding" -> "compress;q=0.5, gzip;q=1.0"

This is using just Fuel (not the android lib) in a Spring Boot app with the Kotlin RC

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kittinunfcommented, Feb 6, 2016

Oh I am sorry. What I actually mean is that you can override httpHeader it with header function at request level. url.header("Content-Type" to "application/json").httpPost ....

0reactions
kittinunfcommented, Feb 7, 2016

Agree. I’ll do it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sticky Headers: 5 Ways to Make Them Better
Sticky headers (or persistent headers) are a common pattern for keeping the header of a website or app in the same place on...
Read more >
position:sticky is not working - Stack Overflow
header has a height of 150px. .navbar has a height of 20px. When the user scrolls, I want .navbar to stick at the...
Read more >
Header not sticking on top on-scroll - WordPress.org
Hi,. I need some help regarding an issue I have been recently dealing with. The client asked for the before-scroll header/navbar to have...
Read more >
Position Sticky and Table Headers | CSS-Tricks
There are two very extreme reactions to this, should you need to implement sticky table headers and not be aware of the <th>...
Read more >
How to Add a Sticky Header or On-scroll Fixed Header with ...
The sticky header will fix the header in the top portion of your webpage when a user scrolls the page. It will allow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found