@@ -194,6 +194,10 @@ def serialize_to_request(self, parameters, operation_model):
194
194
'X-Version' : operation_model .metadata ['apiVersion' ],
195
195
}
196
196
)
197
+
198
+ if 'requestUri' in operation_model .http :
199
+ serialized ['url_path' ] = operation_model .http ['requestUri' ]
200
+
197
201
body_params = self .MAP_TYPE ()
198
202
199
203
if shape is not None :
@@ -363,6 +367,9 @@ def serialize_to_request(self, parameters, operation_model):
363
367
'X-Version' : operation_model .metadata ['apiVersion' ],
364
368
}
365
369
)
370
+ if 'requestUri' in operation_model .http :
371
+ serialized ['url_path' ] = operation_model .http ['requestUri' ]
372
+
366
373
body_params = self .MAP_TYPE ()
367
374
custom_body = None
368
375
if 'Body' in parameters :
@@ -377,7 +384,6 @@ def _serialize_data(self, serialized, data, body=None):
377
384
if body is not None :
378
385
serialized ['body' ] = json .dumps (body ).encode (self .DEFAULT_ENCODING )
379
386
serialized ['query_string' ] = data
380
- print serialized
381
387
return serialized
382
388
383
389
@@ -395,6 +401,9 @@ def serialize_to_request(self, parameters, operation_model):
395
401
serialized ['method' ] = operation_model .http .get ('method' ,
396
402
self .DEFAULT_METHOD )
397
403
404
+ if 'requestUri' in operation_model .http :
405
+ serialized ['url_path' ] = operation_model .http ['requestUri' ]
406
+
398
407
serialized ['query_string' ] = self .MAP_TYPE ()
399
408
400
409
serialized ['headers' ] = {
@@ -497,6 +506,10 @@ class BaseRestSerializer(Serializer):
497
506
498
507
def serialize_to_request (self , parameters , operation_model ):
499
508
serialized = self ._create_default_request ()
509
+ serialized ['headers' ] = {
510
+ 'X-Action' : operation_model .name ,
511
+ 'X-Version' : operation_model .metadata ['apiVersion' ]
512
+ }
500
513
serialized ['method' ] = operation_model .http .get ('method' ,
501
514
self .DEFAULT_METHOD )
502
515
shape = operation_model .input_shape
0 commit comments