mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 06:23:44 +08:00
platform: support unix
This commit is contained in:
parent
670333fcc2
commit
7b352a44f1
@ -1,4 +1,3 @@
|
|||||||
// #[cfg(any(target_os = "linux", target_os = "macos"))]
|
|
||||||
use crate::model::E;
|
use crate::model::E;
|
||||||
use http_body_util::{BodyExt, Full};
|
use http_body_util::{BodyExt, Full};
|
||||||
use hyper::{
|
use hyper::{
|
||||||
@ -30,12 +29,12 @@ impl UnixClient {
|
|||||||
|
|
||||||
pub async fn send_request(
|
pub async fn send_request(
|
||||||
&self,
|
&self,
|
||||||
socket_path: &str,
|
socket_path: String,
|
||||||
path: &str,
|
path: &str,
|
||||||
method: Method,
|
method: Method,
|
||||||
body: Option<Value>,
|
body: Option<Value>,
|
||||||
) -> Result<Value, E> {
|
) -> Result<Value, E> {
|
||||||
let uri = self.generate_unix_path(socket_path, path).await;
|
let uri = self.generate_unix_path(socket_path.as_str(), path).await;
|
||||||
|
|
||||||
let mut request_builder = Request::builder().method(method).uri(uri);
|
let mut request_builder = Request::builder().method(method).uri(uri);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user