Make status code a digit
Closed this issue · 3 comments
membersound commented
Is there any valid rease why the statuscode parameter is designed as String?
new MockResponse.Builder().status("200").build()
It would be way better to take an interger, like:
new MockResponse.Builder().status(200).build()
JakeWharton commented
It represents the status line, which is both the code and reason components.
yschimke commented
Use setResponseCode(200) instead
membersound commented
I discovered in java the method is call .code(int):
new MockResponse.Builder().code(401).build()