Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Authorization header not sent for GET method in swift 3 #2193
I am sending bearer token in header which is working for post method. The code below is I am using for POST method
for GET method I am using below code
but I always get response as unauthorized. i have checked the server log,it doesn't receive http header I am sending.
what is wrong with Alamofire here?
macOS version : macOS Sierra 10.12.5
I would suggest using a proxy tool like Charles Proxy to check what you're actually sending vs. what you're seeing in the server logs. We have extensive tests around this scenario so it's unlikely there's an issue within Alamofire. However, if your investigation does reveal an Alamofire bug, let us know and we can reopen this issue.
There is No Issue In This,
please check your api url string as if you write the url as
@jshier I suggest to add method for rewrite the url and query string before calling to ignore such issues
You're my hero, thank you so much! You're awesome