onSubmit - return response
jdarnok opened this issue · 3 comments
jdarnok commented
Hey! This package works great, but I'm dealing with one issue.
onSubmit
is only returning the payload while onError
returns the response. For me this consistency is important because of the header token authorization that I'm using - every response has a fresh token that my client is obligated to use in the next response. I can get this flow to work when uploading fails because of reasons but I can't do the same thing with the successful upload - it never reaches this callback.
In short:
onSubmit(request) {
console.log('request', request.headers);
}
Is always undefined.
sebastian-palma commented
Did you solve this @jdarnok?