(
self,
method=None,
url=None,
headers=None,
data=None,
params=None,
auth_path=None,
stream_output=False,
)
| 435 | _REQUEST_PREPARER_CLS = AWSRequestPreparer |
| 436 | |
| 437 | def __init__( |
| 438 | self, |
| 439 | method=None, |
| 440 | url=None, |
| 441 | headers=None, |
| 442 | data=None, |
| 443 | params=None, |
| 444 | auth_path=None, |
| 445 | stream_output=False, |
| 446 | ): |
| 447 | self._request_preparer = self._REQUEST_PREPARER_CLS() |
| 448 | |
| 449 | # Default empty dicts for dict params. |
| 450 | params = {} if params is None else params |
| 451 | |
| 452 | self.method = method |
| 453 | self.url = url |
| 454 | self.headers = HTTPHeaders() |
| 455 | self.data = data |
| 456 | self.params = params |
| 457 | self.auth_path = auth_path |
| 458 | self.stream_output = stream_output |
| 459 | |
| 460 | if headers is not None: |
| 461 | for key, value in headers.items(): |
| 462 | self.headers[key] = value |
| 463 | |
| 464 | # This is a dictionary to hold information that is used when |
| 465 | # processing the request. What is inside of ``context`` is open-ended. |
| 466 | # For example, it may have a timestamp key that is used for holding |
| 467 | # what the timestamp is when signing the request. Note that none |
| 468 | # of the information that is inside of ``context`` is directly |
| 469 | # sent over the wire; the information is only used to assist in |
| 470 | # creating what is sent over the wire. |
| 471 | self.context = {} |
| 472 | |
| 473 | def prepare(self): |
| 474 | """Constructs a :class:`AWSPreparedRequest <AWSPreparedRequest>`.""" |
no test coverage detected