Skip to content

Commit a0a0a14

Browse files
committed
Support 204 response in axios
1 parent 0bb5970 commit a0a0a14

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/client/src/classes/client.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ class Client {
154154
data = this.createRequest(data);
155155

156156
const promise = new Promise((resolve, reject) => {
157-
axios(data)
157+
axios(data, {
158+
validateStatus: function (status) {
159+
return status >= 200 && status < 300 || status === 204;
160+
}
161+
})
158162
.then(response => {
159163
return resolve([
160164
new Response(response.status, response.data, response.headers),

0 commit comments

Comments
 (0)