Closed fijar-lazuardy closed 2 months ago
Hey there, thanks for raising this issue.
I'm aware of the issue with parsing the headers. The current implementation works well enough for a release, so I released it, but it's nevertheless kinda broken.
So you can work around that by utilizing the ability to store sensitive information in an external "environment" file, which shouldn't be checked into source control, but can be sent to colleagues..
Something like this might work:
Put a http-client.env.json
file in the same dir your *.http
file is or somewhere above that directory (because kulala searches upwards, until it finds one of these files).
The contents of this file should look something like this:
{
"dev": {
"auth_header": "Basic Base64encodedstring=="
},
"prod": {
"auth_header": "Basic Base64encodedstring=="
}
}
Then the http file should look something like this:
GET http://localhost:3000/api/v2/get_stuff HTTP/1.1
accept: application/json
authorization: {{auth_header}}
I'm already working on a complete rewrite of the parser --> #18
will try later, thanks for the response!
Should be possible with the new v2.0.0
release and the completely new parser.
I have authorization header that is base64 encoded so something like
Authorization: Basic Base64encodedstring==
But the "==" make it doesn't work. any idea to make it work?