Skip to content

curl tool option to percent-encode the passed raw URL #514

@vszakats

Description

@vszakats

In certain situations it'd would be useful if curl (the tool) could translate a raw URL (f.e. containing spaces or other special characters) passed to its command-line to the percent-encoded (AKA 'URL encoded') version that would then be used to make the actual request.

This could be handy on Windows mainly, where the % sign has special uses, so including it in a command may be problematic (needs different escaping on the command-line, inside a batch file, in shell script), or impossible.

So f.e. this line:

curl -O https://example.com/hello%20world.txt

could become:

curl -O "https://example.com/hello world.txt" -rawurl

Required low-level logic is already implemented in the codebase as curl_easy_escape().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions