Check-in [00ff8bac09]
Overview
Comment: | Allow to override encoding= for .text results (requests can't detect it automatically for binary/json responses). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
00ff8bac0988bdf00a3ba5df30cf453b |
User & Date: | mario on 2015-05-03 14:09:28 |
Other Links: | manifest | tags |
Context
2015-05-03
| ||
14:10 | Detect all command names in player config, so that both `xterm` and `streamripper` are probed for existence. Use dict comprehension for plugin_meta lookup. Remove wrap_entry in favour of generic uikit.wrap(). check-in: 91f8502978 user: mario tags: trunk | |
14:09 | Allow to override encoding= for .text results (requests can't detect it automatically for binary/json responses). check-in: 00ff8bac09 user: mario tags: trunk | |
14:08 | Support multiple `plugin_base` references (namely "channels" and "plugins"). check-in: 12d3b19c1d user: mario tags: trunk | |
Changes
Modified ahttp.py from [1ab0a64254] to [060cc1e22c].
︙ | ︙ | |||
49 50 51 52 53 54 55 | }) #-- Retrieve data via HTTP # # Well, it says "get", but it actually does POST and AJAXish GET requests too. # | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | }) #-- Retrieve data via HTTP # # Well, it says "get", but it actually does POST and AJAXish GET requests too. # def get(url, params={}, referer="", post=0, ajax=0, binary=0, feedback=None, content=True, verify=False, statusmsg=None, encoding=None): # statusbar info progress_feedback(url) # combine headers headers = {} if ajax: |
︙ | ︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 | statusmsg and progress_feedback(statusmsg) if not content: return r elif binary: r = r.content else: # Receival is actually happening here r = r.text # clean statusbar statusmsg and progress_feedback() return r #-- Append missing trailing slash to URLs | > > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | statusmsg and progress_feedback(statusmsg) if not content: return r elif binary: r = r.content else: # Receival is actually happening here if encoding: r.encoding = encoding r = r.text # clean statusbar statusmsg and progress_feedback() return r #-- Append missing trailing slash to URLs |
︙ | ︙ |