From 341bed9e17be5d8cf22378450bc95a36f9119efb Mon Sep 17 00:00:00 2001 From: Stewart Polley Date: Sat, 8 Oct 2016 06:22:07 +1000 Subject: [PATCH] Add Documentation for custom methods --- docs/user/advanced.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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