I have colon (:) in my query string and escaping the colon is not working as expected. The query works in httpie
.
http://localhost:3000/games> get 'where[id\:gt]:=2'
HTTPie 0.9.9
Requests 2.13.0
Pygments 2.2.0
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609]
/usr/bin/python
Linux 4.4.0-59-generic
<Environment {
"colors": 256,
"config": {
"__meta__": {
"about": "u'HTTPie configuration file'",
"help": "u'https://github.com/jkbrzt/httpie#config'",
"httpie": "u'0.9.4'"
},
"default_options": "[]"
},
"config_dir": "/home/kishan/.httpie",
"is_windows": false,
"stderr": "<open file '<stderr>', mode 'w' at 0x7fac21dbb1e0>",
"stderr_isatty": true,
"stdin": "<open file '<stdin>', mode 'r' at 0x7fac21dbb0c0>",
"stdin_encoding": "UTF-8",
"stdin_isatty": true,
"stdout": "<http_prompt.output.Printer object at 0x7fac1b3ce790>",
"stdout_encoding": "utf8",
"stdout_isatty": true
}>
>>> requests.request(**{
"allow_redirects": false,
"auth": "None",
"cert": "None",
"data": {},
"files": {},
"headers": {
"User-Agent": "HTTPie/0.9.9",
"where[id": "gt]:=2"
},
"method": "u'get'",
"params": {},
"proxies": {},
"stream": true,
"timeout": 30,
"url": "u'http://localhost:3000/games'",
"verify": true
})
http: error: ConnectionError: ('Connection aborted.', BadStatusLine("''",)) while doing GET request to URL: http://localhost:3000/games
('Connection aborted.', BadStatusLine("''",))