Send a resource to the server using PATCH.
(
self,
path,
data="",
content_type="application/octet-stream",
follow=False,
secure=False,
*,
headers=None,
query_params=None,
**extra,
)
| 1273 | return response |
| 1274 | |
| 1275 | def patch( |
| 1276 | self, |
| 1277 | path, |
| 1278 | data="", |
| 1279 | content_type="application/octet-stream", |
| 1280 | follow=False, |
| 1281 | secure=False, |
| 1282 | *, |
| 1283 | headers=None, |
| 1284 | query_params=None, |
| 1285 | **extra, |
| 1286 | ): |
| 1287 | """Send a resource to the server using PATCH.""" |
| 1288 | self.extra = extra |
| 1289 | self.headers = headers |
| 1290 | response = super().patch( |
| 1291 | path, |
| 1292 | data=data, |
| 1293 | content_type=content_type, |
| 1294 | secure=secure, |
| 1295 | headers=headers, |
| 1296 | query_params=query_params, |
| 1297 | **extra, |
| 1298 | ) |
| 1299 | if follow: |
| 1300 | response = self._handle_redirects( |
| 1301 | response, |
| 1302 | data=data, |
| 1303 | content_type=content_type, |
| 1304 | headers=headers, |
| 1305 | query_params=query_params, |
| 1306 | **extra, |
| 1307 | ) |
| 1308 | return response |
| 1309 | |
| 1310 | def delete( |
| 1311 | self, |