microsoft / typed-rest-client

Node Rest and Http Clients with typings for use with TypeScript
Other
675 stars 118 forks source link

Propogate headers in RestClient's IRestResponse #87

Closed damccorm closed 5 years ago

damccorm commented 6 years ago

Environment

Node version: Npm version: 8.11.4 OS and version: Windows 10 typed-rest-client version: 1.0.9

Issue Description

Currently, in RestClient, calls to the public functions all receive a httpm.HttpClientResponse object which contains headers but return a promise of an IRestResponse object which does not contain headers.

Expected behaviour

IRestResponse should contain headers

Actual behaviour

IRestResponse only contains information pulled from the result and the status code.

Steps to reproduce

let restc: RestClient = new RestClient('rest-samples', 'httpbin.org/');
let restRes: IRestResponse<Object> = await restc.get<Object>('get');

Try to get headers from restRes

damccorm commented 6 years ago

@wham any update on this? Are you still looking for a contribution?

debben commented 5 years ago

I see a contribution was accepted, but is there any timeline for when this will be released?

damccorm commented 5 years ago

@bryanmacfarlane can we release?

debben commented 5 years ago

The fix for this has been merged for a month now. Any updates on getting a release?

damccorm commented 5 years ago

Sorry, this slipped through the cracks - it has been published.