🤖 Merge PR #45737 [superagent] Fix Request.write return type by @danielrearden

This commit is contained in:
Daniel Rearden 2020-06-27 05:56:21 -04:00 committed by GitHub
parent 5ca1e873b7
commit 58752d5aff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -168,7 +168,7 @@ declare namespace request {
unset(field: string): this;
use(fn: Plugin): this;
withCredentials(): this;
write(data: string | Buffer, encoding?: string): this;
write(data: string | Buffer, encoding?: string): boolean;
maxResponseSize(size: number): this;
}

View File

@ -305,8 +305,8 @@ request
req.part()
.set('Content-Type', 'image/png')
.set('Content-Disposition', 'attachment; filename="myimage.png"')
.write('some image data')
.write('some more image data');
.write('some image data');
req.write('some more image data');
req.part()
.set('Content-Disposition', 'form-data; name="name"')