Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): remove http features #6742

Merged
merged 2 commits into from Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/move-http-api.md
@@ -0,0 +1,6 @@
---
"api": patch
"tauri": patch
---

Moved the `http` feature to its own plugin in the plugins-workspace repository.
4 changes: 1 addition & 3 deletions core/tauri/Cargo.toml
Expand Up @@ -144,11 +144,9 @@ updater = [
"minisign-verify",
"time",
"base64",
"http-api",
"dialog-ask",
"fs-extract-api"
]
http-api = [ ]
http-multipart = [ "reqwest/multipart" ]
shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ]
fs-extract-api = [ "zip" ]
Expand Down Expand Up @@ -212,7 +210,7 @@ fs-rename-file = [ ]
fs-write-file = [ ]
global-shortcut-all = [ ]
http-all = [ "http-request" ]
http-request = [ "http-api" ]
http-request = [ ]
notification-all = [ "notification", "dialog-ask" ]
os-all = [ "os_info" ]
path-all = [ ]
Expand Down
9 changes: 4 additions & 5 deletions core/tauri/scripts/bundle.global.js

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions core/tauri/src/api/error.rs
Expand Up @@ -24,16 +24,13 @@ pub enum Error {
/// The network error.
#[error("Network Error: {0}")]
Network(#[from] reqwest::Error),
/// HTTP method error.
#[error(transparent)]
HttpMethod(#[from] http::method::InvalidMethod),
/// Invalid HTTP header value.
#[error(transparent)]
HttpHeaderValue(#[from] http::header::InvalidHeaderValue),
/// Invalid HTTP header value.
#[error(transparent)]
HttpHeader(#[from] http::header::InvalidHeaderName),
/// Failed to serialize header value as string.
/// Failed to convert bytes to string.
#[error(transparent)]
Utf8(#[from] std::string::FromUtf8Error),
/// HTTP form to must be an object.
Expand Down