Skip to content

Commit

Permalink
refactor(core): remove http features (#6742)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Apr 19, 2023
1 parent 2d5378b commit f78a378
Show file tree
Hide file tree
Showing 24 changed files with 77 additions and 1,631 deletions.
6 changes: 6 additions & 0 deletions .changes/move-http-api.md
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading

0 comments on commit f78a378

Please sign in to comment.