mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
npm packaging
This commit is contained in:
parent
6e3f968f9c
commit
656eb67bfb
9 changed files with 82 additions and 24 deletions
|
@ -7,8 +7,8 @@ mod wrappers;
|
|||
|
||||
use tokioio::TokioIo;
|
||||
use utils::{ReplaceErr, UriExt};
|
||||
use wrappers::{IncomingBody, WsStreamWrapper};
|
||||
use websocket::EpxWebSocket;
|
||||
use wrappers::{IncomingBody, WsStreamWrapper};
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -17,7 +17,7 @@ use bytes::Bytes;
|
|||
use futures_util::StreamExt;
|
||||
use http::{uri, HeaderName, HeaderValue, Request, Response};
|
||||
use hyper::{body::Incoming, client::conn::http1::Builder, Uri};
|
||||
use js_sys::{Function, Array, Object, Reflect, Uint8Array};
|
||||
use js_sys::{Array, Function, Object, Reflect, Uint8Array};
|
||||
use penguin_mux_wasm::{Multiplexor, MuxStream};
|
||||
use tokio_rustls::{client::TlsStream, rustls, rustls::RootCertStore, TlsConnector};
|
||||
use tokio_util::{
|
||||
|
@ -226,7 +226,10 @@ impl EpoxyClient {
|
|||
protocols: Vec<String>,
|
||||
origin: String,
|
||||
) -> Result<EpxWebSocket, JsError> {
|
||||
EpxWebSocket::connect(self, onopen, onclose, onerror, onmessage, url, protocols, origin).await
|
||||
EpxWebSocket::connect(
|
||||
self, onopen, onclose, onerror, onmessage, url, protocols, origin,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn fetch(&self, url: String, options: Object) -> Result<web_sys::Response, JsError> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue