コミットを比較
3 コミット
33defb85a7
...
4161a3d721
| 作成者 | SHA1 | 日付 |
|---|---|---|
|
|
4161a3d721 | |
|
|
2d434d83a1 | |
|
|
41a0f64ff7 |
ファイル差分が大きすぎるため省略します
差分を読み込み
|
|
@ -92,11 +92,14 @@ def datadir(tmp_path):
|
||||||
|
|
||||||
|
|
||||||
def make_request(path='/', host='localhost', port=SERVEFILE_DEFAULT_PORT, method='get', protocol='http', timeout=5,
|
def make_request(path='/', host='localhost', port=SERVEFILE_DEFAULT_PORT, method='get', protocol='http', timeout=5,
|
||||||
**kwargs):
|
encoding='utf-8', **kwargs):
|
||||||
url = '{}://{}:{}{}'.format(protocol, host, port, path)
|
url = '{}://{}:{}{}'.format(protocol, host, port, path)
|
||||||
print('Calling {} on {} with {}'.format(method, url, kwargs))
|
print('Calling {} on {} with {}'.format(method, url, kwargs))
|
||||||
r = getattr(requests, method)(url, **kwargs)
|
r = getattr(requests, method)(url, **kwargs)
|
||||||
|
|
||||||
|
if r.encoding is None and encoding:
|
||||||
|
r.encoding = encoding
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
読み込み中…
新しいイシューから参照