0

I have a url like :- http://example.com/GetDetails/value/abc-1234

I'm using python urllib to fetch the url.

value = "abc-12345"
URL = "http://example.com/GetDetails/value/{0}"
response = urllib.urlopen(URL.format(urllib.quote_plus(value))).read()

This works fine. But if I have a slash in my value like - "XYZ/1234", it returns 400 Bad request.

What I'm doing wrong ?

Billy
  • 5,179
  • 2
  • 27
  • 53
abhisahay
  • 65
  • 5

0 Answers0