swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

Properties of HTTPResponses are now var #176

Closed fabianfett closed 3 years ago

fabianfett commented 3 years ago

Properties of HTTPResponse types should be var not let

Motivation:

When creating responses in Lambda developers might want to create the response in multiple steps changing and adding properties. As of now this is not possible since all HTTPResponse types only have let properties. If a developer wants to mark a response as immutable they have still the option to mark the complete response as let.

Modifications:

Result:

Developers have an easier job creating responses. 🥳