Set server response headers (#1086)
This commit adds support for the `httpHeaders` and `httpPrefixHeaders` when applied to error shapes and operation output shapes to the server implementation. The presence of response headers is now asserted against in server protocol tests. Functions that set headers in requests that were used by the client have been refactored into `HttpBindingGenerator.kt`, since they are useful for the server to set headers in responses. This commit also makes error shapes be serialized in JSON responses with a `__type` field in the body, in favor of setting the `X-Amzn-Errortype` header, as recommended by the specs of all AWS protocols. This commit also removes the generation of operation structs for the server in `ProtocolGenerator.kt`, since they are not useful for the server implementation. Closes #1071 #1075.
Loading
Please register or sign in to comment