Azure / azure-functions-durable-js

JavaScript library for using the Durable Functions bindings
https://www.npmjs.com/package/durable-functions
MIT License
128 stars 46 forks source link

Remove IHttpRequest and IHttpResponse interfaces #462

Closed hossam-nasr closed 1 year ago

hossam-nasr commented 1 year ago

Resolves #454. This PR removes the IHttpResponse and IHttpRequest object, and instead relies on the HttpResponse and HttpRequest objects from @azure/functions (respectively). Since this affects the type signatures of public APIs, this is a breaking change, but we discussed offline, and we decided this is a breaking change worth pursuing. In most cases, this should actually help customers, since the expected HttpRequest argument to APIs is usually the request object given to the client functions (which now has HttpRequest type), and the HttpResponse type is usually passed as the return value of the function, which now is expected to be HttpResponse. I'm not sure why the IHttpResponse and IHttpRequest types were honored/respected before, but I've removed the checks/tests related to that as well.