twilio-python icon indicating copy to clipboard operation
twilio-python copied to clipboard

URL encode request params

Open mcelicalderon opened this issue 10 years ago • 1 comments

Version: 6.0.0rc12 API Subdomain (api/taskrouter/ip_messaging): lookups

Code Snippet

number = client.lookups.phone_numbers("+4402077651182").fetch()
number = client.lookups.phone_numbers("(510) 867-5309").fetch()

Request are not URL encoding parameters. The above snippets will produce the requests:

GET: lookups.twilio.com/v1/PhoneNumbers/+4402077651182 -> (+ will be miss misinterpreted)
GET: lookups.twilio.com/v1/PhoneNumbers/(510) 867-5309 -> (invalid URL)

Legacy libraries and at least PHP next-gen do encode params.

mcelicalderon avatar Sep 23 '16 21:09 mcelicalderon

This is done.

jingming avatar Apr 05 '17 14:04 jingming