mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
cleanup(ext/fetch): consistent op names (#12612)
Rename `op_create_http_client` to `op_fetch_custom_client` to follow prefix/namespaced convention
This commit is contained in:
parent
e06515c5a9
commit
e98a36b213
2 changed files with 6 additions and 3 deletions
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
function createHttpClient(options) {
|
||||
options.caCerts ??= [];
|
||||
return new HttpClient(core.opSync("op_create_http_client", options));
|
||||
return new HttpClient(core.opSync("op_fetch_custom_client", options));
|
||||
}
|
||||
|
||||
class HttpClient {
|
||||
|
|
|
@ -77,7 +77,10 @@ pub fn init<P: FetchPermissions + 'static>(
|
|||
("op_fetch_send", op_async(op_fetch_send)),
|
||||
("op_fetch_request_write", op_async(op_fetch_request_write)),
|
||||
("op_fetch_response_read", op_async(op_fetch_response_read)),
|
||||
("op_create_http_client", op_sync(op_create_http_client::<P>)),
|
||||
(
|
||||
"op_fetch_custom_client",
|
||||
op_sync(op_fetch_custom_client::<P>),
|
||||
),
|
||||
])
|
||||
.state(move |state| {
|
||||
state.put::<reqwest::Client>({
|
||||
|
@ -455,7 +458,7 @@ pub struct CreateHttpClientOptions {
|
|||
private_key: Option<String>,
|
||||
}
|
||||
|
||||
pub fn op_create_http_client<FP>(
|
||||
pub fn op_fetch_custom_client<FP>(
|
||||
state: &mut OpState,
|
||||
args: CreateHttpClientOptions,
|
||||
_: (),
|
||||
|
|
Loading…
Add table
Reference in a new issue