From e98a36b213173dbae60fd2594412e91404b2cef2 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Sun, 31 Oct 2021 19:14:22 +0100 Subject: cleanup(ext/fetch): consistent op names (#12612) Rename `op_create_http_client` to `op_fetch_custom_client` to follow prefix/namespaced convention --- ext/fetch/22_http_client.js | 2 +- ext/fetch/lib.rs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'ext') diff --git a/ext/fetch/22_http_client.js b/ext/fetch/22_http_client.js index 592256c71..174612288 100644 --- a/ext/fetch/22_http_client.js +++ b/ext/fetch/22_http_client.js @@ -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 { diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index ae81d126c..13adae1a7 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -77,7 +77,10 @@ pub fn init( ("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::

)), + ( + "op_fetch_custom_client", + op_sync(op_fetch_custom_client::

), + ), ]) .state(move |state| { state.put::({ @@ -455,7 +458,7 @@ pub struct CreateHttpClientOptions { private_key: Option, } -pub fn op_create_http_client( +pub fn op_fetch_custom_client( state: &mut OpState, args: CreateHttpClientOptions, _: (), -- cgit v1.2.3