response.statusCode should be a Number
franciscolourenco opened this issue · comments
Describe the bug
response.statusCode
is a String, but it should be a Number. All the libraries I've used so far use numbers for status codes, including nodejs.
https://nodejs.org/api/http.html#http_response_statuscode
To Reproduce
Make a request with gotql.query()
and examinine the statusCode
property of the response.
Current behavior
typeof response.statusCode === 'string'
Expected behavior
typeof response.statusCode === 'number'
Strange, there's a test for it asserting deep equally that it's a 500
, will look into it
Currently, the status code is typed as number
as per the interface below:
gotql/src/types/UserOptions.ts
Line 10 in 056de85
Also, got
types its responses as number
and TypeScript is typing it as number:
And Got too:
I wasn't able to reproduce this error, can you please provide an example?
Can't reproduce it anymore either, thanks!