Skip to content

pass credentials for http basic auth #89

@joshuali925

Description

@joshuali925

Using curl, credentials can be passed with the -u <user>:<pass> flag:

curl -u guest:guest https://jigsaw.w3.org/HTTP/Basic/

But I didn't find the corresponding option here, how to do the same in rest.nvim? thanks


I took another look and seems auth is not supported yet? A simple fix would be to also exclude @ when encoding url
https://github.com/NTBBloodbath/rest.nvim/blob/3ab950fe88cf836c83fa15a10e386ccd5f6aa1cb/lua/rest-nvim/utils/init.lua#L273-L274

According to https://stackoverflow.com/a/19737890 @ can be used directly in url, and then this will work

GET https://guest:guest@jigsaw.w3.org/HTTP/Basic/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions