Skip to content

Add option to select + or %20 space encoding. #2

@ag-TJNII

Description

@ag-TJNII

Currently the library encodes spaces as +:

[13] pry(main)> BasicUrl.new(host: 'foo', protocol: 'http', path: 'some spaced string').to_s
=> "http://foo/some+spaced+string"

This is coming from URI.encode_www_form_component:

However, the server might not like + instead of %20. This encoding should be an option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions