Added 'files' parameter to POST, PUT and PATCH methods, which is passed directly onto requests.
The 'data' parameter now has a default=None, because some calls may only modify files.
Also refactored a bit of the code that was repeated in those methods inside _request