borchero / Squid

Declarative and Reactive Networking for Swift.

Home Page:https://squid.borchero.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Headers are getting URL encoded?

kevinrenskers opened this issue · comments

In my HTTPService I set a header:

var header: HttpHeader {
  HttpHeader([
    .accept: HttpMimeType.json.rawValue,
    .authorization: "Bearer \(token)",
  ])
}

This is getting sent as Bearer%20DsNYO6w84ZaJBJyYWHEtStTBoRCquu3XAQc0tVH8ggq3orn7UAYGYvfrU8ZjYKQTHvKB2W28xZuUjMmZ, and the server really doesn't like this. Why is it getting encoded, and can I do something about that?

Ouh that shouldn't happen. I'll have a look what's going on here.

Fixed in release 1.3.2. I honestly don't know why the values where escaped in the first place though...

Yea, that seems like something the dev should do in their app code? Anyway, thanks again! :)