Add response code?
speedbird25 opened this issue · 3 comments
Currently I use the useResource hook. I am trying to get the response code from this hook, however only the response.data and no response.code (coming from axios) is returned. In my case I have to deal with a no content 204 response, however in this case where response.data is undefined I did not find any way to find out if the request was successful or not.
Is there any way to find out the response code, e.g. using useRequest hook and ready()?
Currently I use the useResource hook. I am trying to get the response code from this hook, however only the response.data and no response.code (coming from axios) is returned. In my case I have to deal with a no content 204 response, however in this case where response.data is undefined I did not find any way to find out if the request was successful or not.
Is there any way to find out the response code, e.g. using useRequest hook and ready()?
I have the same request.
Had to deal with 204 responses last week to close a modal and reload a datagrid. Just check if response.data === ''