You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Accept: 'application/json'// If we do not do this, Laravel will redirect to / in the event of an error, hiding the returned validation error.
203
-
}
204
-
})
205
-
206
-
consteventListener=(): void=>{
207
-
voidtask.cancelAsync()
208
-
}
209
-
210
-
try{
211
-
signal.addEventListener('abort',eventListener)
212
-
213
-
constresult=awaittask.uploadAsync()
214
-
215
-
// NOTE: According to Expo's documentation, this should only return a value or undefined, but it has been observed to return null when the task is aborted.
216
-
if(result===undefined||result===null){
217
-
thrownewAbortError()
218
-
}else{
219
-
response=result
220
-
}
221
-
}finally{
222
-
signal.removeEventListener('abort',eventListener)
223
-
}
224
-
break
225
-
}
226
-
}
173
+
constresponse=awaitthis.fetch(url,{
174
+
signal,
175
+
method,
176
+
headers: {
177
+
...this.commonHeaders(),
178
+
...this.requestBodyHeaders(requestBody),
179
+
Accept: 'application/json'// If we do not do this, Laravel will redirect to / in the event of an error, hiding the returned validation error.
0 commit comments