mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-13 06:20:02 -04:00
add epoxy info function
This commit is contained in:
parent
569789c2a0
commit
72d43508d0
5 changed files with 19 additions and 4 deletions
|
@ -43,6 +43,20 @@ mod utils;
|
|||
mod websocket;
|
||||
mod ws_wrapper;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn info() -> Object {
|
||||
let obj = Object::new();
|
||||
object_set(&obj, "version", env!("CARGO_PKG_VERSION").into());
|
||||
cfg_if! {
|
||||
if #[cfg(feature = "full")] {
|
||||
object_set(&obj, "minimal", false.into());
|
||||
} else {
|
||||
object_set(&obj, "minimal", true.into());
|
||||
}
|
||||
};
|
||||
obj
|
||||
}
|
||||
|
||||
type HttpBody = http_body_util::Full<Bytes>;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue