Skip to content

Commit f581bed

Browse files
committed
Remove non-existing arguments from aws' SignatureV4 constructor
1 parent c22b9c7 commit f581bed

File tree

3 files changed

+15
-38
lines changed

3 files changed

+15
-38
lines changed

src/data/markdown/docs/20 jslib/01 jslib/01 aws/00 SignatureV4.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@ export default function () {
6868
secretAccessKey: awsConfig.secretAccessKey,
6969
sessionToken: awsConfig.sessionToken,
7070
},
71+
72+
/**
73+
* Whether the URI should be escaped or not.
74+
*/
75+
uriEscapePath: false,
76+
77+
/**
78+
* Whether or not the body's hash should be calculated and included
79+
* in the request.
80+
*/
81+
applyChecksum: false,
7182
})
7283

7384
/**
@@ -105,17 +116,6 @@ export default function () {
105116
* The headers we will be sending in the request.
106117
*/
107118
headers: {},
108-
109-
/**
110-
* Whether the URI should be escaped or not.
111-
*/
112-
uriEscapePath: false,
113-
114-
/**
115-
* Whether or not the body's hash should be calculated and included
116-
* in the request.
117-
*/
118-
applyChecksum: false,
119119
},
120120

121121
/**

src/data/markdown/docs/20 jslib/01 jslib/01 aws/SignatureV4/00 presign().md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ The first parameter of the `presign` method consists of an Object with the follo
1717
| hostname | string | The hostname the request is sent to |
1818
| path | string | The path of the request |
1919
| headers | Object | The headers of the HTTP request |
20-
| uriEscapePath | boolean | Whether to uri-escape the request URI path as part of computing the canonical request string. This is required for every AWS service, except Amazon S3, as of late 2017. |
21-
| applyChecksum | boolean | Whether to calculate a checksum of the request body and include it as either a request header (when signing) or as a query string parameter (when pre-signing). This is required for AWS Glacier and Amazon S3 and optional for every other AWS service as of late 2017. |
22-
| | | |
2320

2421
You can provide further options and override SignatureV4 options in the context of this specific request.
2522
To do this, pass a second parameter to the `presign` method, which is an Object with the following parameters.
@@ -75,6 +72,8 @@ export default function () {
7572
secretAccessKey: awsConfig.secretAccessKey,
7673
sessionToken: awsConfig.sessionToken,
7774
},
75+
uriEscapePath: false,
76+
applyChecksum: false,
7877
})
7978

8079
// We can now use the signer to produce a pre-signed URL.
@@ -112,17 +111,6 @@ export default function () {
112111
* hash calculation, and communicate that value instead, as specified.
113112
*/
114113
headers: { [AMZ_CONTENT_SHA256_HEADER]: 'UNSIGNED-PAYLOAD' },
115-
116-
/**
117-
* Whether the URI should be escaped or not.
118-
*/
119-
uriEscapePath: false,
120-
121-
/**
122-
* Whether or not the body's hash should be calculated and included
123-
* in the request.
124-
*/
125-
applyChecksum: false,
126114
},
127115

128116
/**

src/data/markdown/docs/20 jslib/01 jslib/01 aws/SignatureV4/00 sign().md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ The first parameter of the `sign` method consists of an Object with the followin
1717
| hostname | string | The hostname the request is sent to |
1818
| path | string | The path of the request |
1919
| headers | Object | The headers of the HTTP request |
20-
| uriEscapePath | boolean | Whether to uri-escape the request URI path as part of computing the canonical request string. This is required for every AWS service, except Amazon S3, as of late 2017. |
21-
| applyChecksum | boolean | Whether to calculate a checksum of the request body and include it as either a request header (when signing) or as a query string parameter (when pre-signing). This is required for AWS Glacier and Amazon S3 and optional for every other AWS service as of late 2017. |
2220
| body (optional) | string or ArrayBuffer | The optional body of the HTTP request |
2321
| query (optional) | `Object.<string, string \| Array.<string>>` | The optional query parameters of the HTTP request |
2422

@@ -69,6 +67,8 @@ export default function () {
6967
secretAccessKey: awsConfig.secretAccessKey,
7068
sessionToken: awsConfig.sessionToken,
7169
},
70+
uriEscapePath: false,
71+
applyChecksum: false,
7272
})
7373

7474
/**
@@ -106,17 +106,6 @@ export default function () {
106106
* The headers we will be sending in the request.
107107
*/
108108
headers: {},
109-
110-
/**
111-
* Whether the URI should be escaped or not.
112-
*/
113-
uriEscapePath: false,
114-
115-
/**
116-
* Whether or not the body's hash should be calculated and included
117-
* in the request.
118-
*/
119-
applyChecksum: false,
120109
},
121110

122111
/**

0 commit comments

Comments
 (0)