kenneth-gray / data-mocks-server

Mock HTTP server
2 stars 4 forks source link

Simplify response functions #14

Closed kenneth-gray closed 5 years ago

kenneth-gray commented 5 years ago

Response functions no longer have to be async. For the majority of cases the response does not need to be nested on an object with a response property. More advanced cases now need to use __override when responseCode, responseHeaders or delay needs to be customised within the same response function.

BREAKING CHANGE: The return object for response functions do not use a nested object with a response property any more. The solution is to either remove the nested response or for more advanced use cases to nest under a further __override property.

kenneth-gray commented 5 years ago

:tada: This PR is included in version 3.4.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: