Fixes a bug where an operation with no input shape is treated with a default payload and therefore has the content-type header added to the request object:
// Serialized request object
HttpRequest {
method: 'GET',
...
headers: {
'content-type': 'application/json', <---- ** Should NOT be set **
host: 'localhost:3001',
'x-amz-user-agent': 'aws-sdk-js/0.0.1',
'user-agent': 'aws-sdk-js/0.0.1 ua/2.0 os/darwin#23.4.0 lang/js md/nodejs#18.20.2',
'amz-sdk-invocation-id': '32c12c5c-6d20-407b-bfec-b78c6b00a0cd',
'amz-sdk-request': 'attempt=1; max=3'
},
body: '',
...
}
This leads to a 415, UnsupportedMediaTypeException, when calling a server with said operation
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
UnsupportedMediaTypeException
, when calling a server with said operationBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.