mirror of https://github.com/flaggo/pydu.git
add doc for request.cookies_str_to_dict
Author: Prodesire <Prodesire@yeah.net>
This commit is contained in:
parent
1922b2de27
commit
3ee18155ec
|
@ -66,3 +66,17 @@ Update query params of given url and return new url.
|
|||
>>> update_query_params('http://example.com', {'foo': 1})
|
||||
'http://example.com?foo=1'
|
||||
```
|
||||
|
||||
|
||||
## request.cookies_str_to_dict
|
||||
```python
|
||||
cookies_str_to_dict(cookies)
|
||||
```
|
||||
|
||||
Convert cookies from str to dict.
|
||||
|
||||
```python
|
||||
>>> from pydu.request import cookies_str_to_dict
|
||||
>>> cookies_str_to_dict('a=a;b=b')
|
||||
{'a': 'a', 'b': 'b'}
|
||||
```
|
||||
|
|
|
@ -62,3 +62,17 @@ update_query_params(url, params)
|
|||
>>> update_query_params('http://example.com', {'foo': 1})
|
||||
'http://example.com?foo=1'
|
||||
```
|
||||
|
||||
|
||||
## request.cookies_str_to_dict
|
||||
```python
|
||||
cookies_str_to_dict(cookies)
|
||||
```
|
||||
|
||||
将字符串类型的Cookies转换为字典对象。
|
||||
|
||||
```python
|
||||
>>> from pydu.request import cookies_str_to_dict
|
||||
>>> cookies_str_to_dict('a=a;b=b')
|
||||
{'a': 'a', 'b': 'b'}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue