urlcat icon indicating copy to clipboard operation
urlcat copied to clipboard

Add option to encode whitespace as %20

Open flxwu opened this issue 4 years ago • 1 comments

Hey,

in some use cases (like OAuth1) we require whitespaces to be encoded as %20, instead of +.

Can you thus please add an option to encode it as %20?

Reference: https://stackoverflow.com/questions/9336267/url-encode-oauth-signature

Thanks :)

flxwu avatar Apr 05 '21 19:04 flxwu

UP !

Kamsou avatar Aug 11 '21 09:08 Kamsou

I've just released v3.0.0 which uses qs - please check if the issue persists. If it does, I'll reopen this issue.

balazsbotond avatar Nov 12 '22 00:11 balazsbotond

@balazsbotond It seems like spaces are still converting to "+" as opposed to %20 as written in the docs. Is there an option to configure RFC formats?

peterdyoon avatar Jun 15 '23 16:06 peterdyoon

nvm, leveraging configure

peterdyoon avatar Jun 15 '23 17:06 peterdyoon

@peterdyoon how did you configure urlcat to escape the + sign?

LRNZ09 avatar Oct 26 '23 07:10 LRNZ09

This works for me in qs 3:

query(params, { objectFormat: { format: "RFC3986" } })

An easier option would be nice...

franck102 avatar Mar 27 '24 11:03 franck102