MCPcopy Create free account
hub / github.com/aws/aws-cli / serialize_to_request

Method serialize_to_request

awscli/botocore/serialize.py:85–121  ·  view source on GitHub ↗

Serialize parameters into an HTTP request. This method takes user provided parameters and a shape model and serializes the parameters to an HTTP request. More specifically, this method returns information about parts of the HTTP request, it does not enforce a particu

(self, parameters, operation_model)

Source from the content-addressed store, hash-verified

83 DEFAULT_ENCODING = 'utf-8'
84
85 def serialize_to_request(self, parameters, operation_model):
86 """Serialize parameters into an HTTP request.
87
88 This method takes user provided parameters and a shape
89 model and serializes the parameters to an HTTP request.
90 More specifically, this method returns information about
91 parts of the HTTP request, it does not enforce a particular
92 interface or standard for an HTTP request. It instead returns
93 a dictionary of:
94
95 * 'url_path'
96 * 'host_prefix'
97 * 'query_string'
98 * 'headers'
99 * 'body'
100 * 'method'
101
102 It is then up to consumers to decide how to map this to a Request
103 object of their HTTP library of choice. Below is an example
104 return value::
105
106 {'body': {'Action': 'OperationName',
107 'Bar': 'val2',
108 'Foo': 'val1',
109 'Version': '2014-01-01'},
110 'headers': {},
111 'method': 'POST',
112 'query_string': '',
113 'host_prefix': 'value.',
114 'url_path': '/'}
115
116 :param parameters: The dictionary input parameters for the
117 operation (i.e the user input).
118 :param operation_model: The OperationModel object that describes
119 the operation.
120 """
121 raise NotImplementedError("serialize_to_request")
122
123 def _create_default_request(self):
124 # Creates a boilerplate default request dict that subclasses

Callers 2

serialize_to_requestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected