posva / mande

<700 bytes convenient and modern wrapper around fetch with smart extensible defaults
https://mande.esm.is
MIT License
1.2k stars 42 forks source link

No response with status code 204 #315

Closed wizbit closed 2 years ago

wizbit commented 2 years ago

When requesting a response and the status code is 204 no response is returned.

// login returns 204 if successful (uses headers to specify user)
api.post<Response>('login', {email, password}, {responseAs: 'response'}).then(response => {
  // response is null
})