Skip to content

Commit

Permalink
Update request.js
Browse files Browse the repository at this point in the history
Allow passing the option `maxBodyLength` through to axios which in turn will pass it on to `follow-redirects`, which is it's default backend in nodejs environments
  • Loading branch information
bennigraf authored Oct 12, 2020
1 parent 00c5955 commit 10a52a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ function prepareRequestOptions(requestOptions, methodOptions) {
if (methodOptions.maxContentLength) {
requestOptions.maxContentLength = methodOptions.maxContentLength;
}
if (methodOptions.maxBodyLength) {
requestOptions.maxBodyLength = methodOptions.maxBodyLength;
}
if (methodOptions.onUploadProgress && typeof methodOptions.onUploadProgress === "function") {
requestOptions.onUploadProgress = methodOptions.onUploadProgress;
}
Expand Down

0 comments on commit 10a52a7

Please sign in to comment.