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

Truncated Headers #4

Open
titosen opened this issue May 25, 2020 · 1 comment
Open

Truncated Headers #4

titosen opened this issue May 25, 2020 · 1 comment

Comments

@titosen
Copy link

titosen commented May 25, 2020

Is there anyone experienced this?

$headers = $this->input->request_headers();
$token = $headers['Authorization'];

returns truncated token. I print the $headers to see why I'm getting 401 status. Here's the
result.

_result of Array
(
[Content-Type
] => application/json
[token
] => eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
[Authorization
] => Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9
[User-Agent
] => PostmanRuntime/7.25.0
[Accept
] =>

I need some help. Thanks!

@ParitoshVaidya
Copy link
Owner

You can use json_encode and json_decode to handle this. Let me know does this fix your problem.

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

No branches or pull requests

2 participants