diff options
| author | Stewart Polley <administrator@tetraetc.com> | 2016-10-08 06:22:07 +1000 |
|---|---|---|
| committer | Stewart Polley <administrator@tetraetc.com> | 2016-10-08 06:22:07 +1000 |
| commit | 341bed9e17be5d8cf22378450bc95a36f9119efb (patch) | |
| tree | 59cdcab8f8d508a7bb273a28ae325717101c9ed4 /docs/user | |
| parent | 7322a09379565bbeba9bb40000b41eab8856352e (diff) | |
| download | python-requests-341bed9e17be5d8cf22378450bc95a36f9119efb.tar.gz | |
Add Documentation for custom methods
Diffstat (limited to 'docs/user')
| -rw-r--r-- | docs/user/advanced.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/advanced.rst b/docs/user/advanced.rst index 681b3fd7..3d890a5e 100644 --- a/docs/user/advanced.rst +++ b/docs/user/advanced.rst @@ -797,6 +797,24 @@ headers. Excellent. Time to write a Python program that abuses the GitHub API in all kinds of exciting ways, 4995 more times. +.. _custom-verbs: + +Custom Verbs +------------ + +From time to time you may be working with a server that, for whatever reason, +allows use or even requires use of HTTP verbs not covered above. One example of +this would be the MKCOL method some WEBDAV servers use. Do not fret, these can +still be used with Requests. These make use of the built-in ``.request`` +method. For example:: + + >>> r = requests.request('mkcol', url, data=data) + >>> r.status_code + 200 # Assuming your call was correct + +Utilising this, you can make use of any method verb that your server allows. + + .. _link-headers: Link Headers |
