A shortcut method that gives a Promise returning a Buffer.
It is semantically the same as settings options.resolveBodyOnly to true and options.responseType to 'buffer'.
A shortcut method that gives a Promise returning a string.
It is semantically the same as settings options.resolveBodyOnly to true and options.responseType to 'text'.
ReadonlyisWhether the promise is canceled.
Cancel the promise and optionally provide a reason.
The cancellation is synchronous. Calling it after the promise has settled or multiple times does nothing.
Optionalreason: stringThe cancellation reason to reject the promise with.
Readonly[toAttaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optionalonfinally: null | (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
A Promise for the completion of the callback.
Attaches callbacks for the resolution and/or rejection of the Promise.
Optionalonfulfilled: null | ((value: T) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
Optionalonrejected: null | ((reason: any) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Attaches a callback for only the rejection of the Promise.
Optionalonrejected: null | ((reason: any) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
A Promise for the completion of the callback.
A shortcut method that gives a Promise returning a JSON object.
It is semantically the same as settings
options.resolveBodyOnlytotrueandoptions.responseTypeto'json'.