mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 10:59:13 +00:00
feat(fetch): mTLS client certificates for fetch() (#11721)
This commit adds support for specifying client certificates when using fetch, by means of `Deno.createHttpClient`.
This commit is contained in:
parent
5d814a4c24
commit
dccf4cbe36
11 changed files with 254 additions and 56 deletions
|
@ -144,8 +144,15 @@ mod tests {
|
|||
use std::fs::read;
|
||||
|
||||
fn create_test_client(ca_data: Option<Vec<u8>>) -> Client {
|
||||
create_http_client("test_client".to_string(), None, ca_data, None, None)
|
||||
.unwrap()
|
||||
create_http_client(
|
||||
"test_client".to_string(),
|
||||
None,
|
||||
ca_data,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap()
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
@ -340,6 +347,7 @@ mod tests {
|
|||
),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let result = fetch_once(FetchOnceArgs {
|
||||
|
@ -370,6 +378,7 @@ mod tests {
|
|||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
@ -402,6 +411,7 @@ mod tests {
|
|||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
|
@ -440,6 +450,7 @@ mod tests {
|
|||
),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let result = fetch_once(FetchOnceArgs {
|
||||
|
@ -480,6 +491,7 @@ mod tests {
|
|||
),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let result = fetch_once(FetchOnceArgs {
|
||||
|
@ -533,6 +545,7 @@ mod tests {
|
|||
),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.unwrap();
|
||||
let result = fetch_once(FetchOnceArgs {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue