diff --git a/.changes/updater-add-on-before-request.md b/.changes/updater-add-on-before-request.md new file mode 100644 index 00000000..612c0ff5 --- /dev/null +++ b/.changes/updater-add-on-before-request.md @@ -0,0 +1,5 @@ +--- +"updater": minor +--- + +Add `on_before_request` hook to the updater plugin. \ No newline at end of file diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index bd3b6d80..1bf3ee97 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -242,6 +242,11 @@ impl UpdaterBuilder { self } + /// Allows you to modify the `reqwest`` client builder before the HTTP request is sent. + /// + /// Note that `reqwest` crate may be updated in minor releases of tauri-plugin-updater. + /// Therefore it's recommended to pin the plugin to at least a minor version when you're using `on_before_request`. + /// pub fn on_before_request ClientBuilder + Send + Sync + 'static>( mut self, f: F,