Add Documentation for custom methods

This commit is contained in:
Stewart Polley
2016-10-08 06:22:07 +10:00
parent 7322a09379
commit 341bed9e17
+18
View File
@@ -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