@mercuryworkshop/epoxy-tls
Advanced tools
Comparing version 1.4.0 to 1.4.1
14
demo.js
@@ -61,2 +61,4 @@ import epoxy from "./pkg/epoxy-module-bundled.js"; | ||
if (should_feature_test) { | ||
let formdata = new FormData(); | ||
formdata.append("a", "b"); | ||
for (const url of [ | ||
@@ -68,6 +70,12 @@ ["https://httpbin.org/get", {}], | ||
["https://httpbin.org/redirect/1", { redirect: "manual" }], | ||
["https://httpbin.org/post", { method: "POST", body: new URLSearchParams("a=b") }], | ||
["https://httpbin.org/post", { method: "POST", body: formdata }], | ||
["https://httpbin.org/post", { method: "POST", body: "a" }], | ||
["https://httpbin.org/post", { method: "POST", body: (new TextEncoder()).encode("abc") }], | ||
["https://httpbin.org/get", { headers: {"a": "b", "b": "c"} }], | ||
["https://httpbin.org/get", { headers: new Headers({"a": "b", "b": "c"}) }] | ||
]) { | ||
let resp = await epoxy_client.fetch(url[0], url[1]); | ||
console.warn(url, resp, Object.fromEntries(resp.headers)); | ||
console.warn(await resp.text()); | ||
log(await resp.text()); | ||
} | ||
@@ -188,3 +196,3 @@ } else if (should_multiparallel_test) { | ||
); | ||
await ws.send((new TextEncoder()).encode("GET / HTTP 1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n")); | ||
await ws.send("GET / HTTP 1.1\r\nHost: google.com\r\nConnection: close\r\n\r\n"); | ||
await (new Promise((res, _) => setTimeout(res, 500))); | ||
@@ -204,3 +212,3 @@ await ws.close(); | ||
log("sending `data`"); | ||
await ws.send((new TextEncoder()).encode("data")); | ||
await ws.send("data"); | ||
await (new Promise((res, _) => setTimeout(res, 50))); | ||
@@ -207,0 +215,0 @@ } |
{ | ||
"name": "@mercuryworkshop/epoxy-tls", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "A wasm library for using raw encrypted tls/ssl/https/websocket streams on the browser", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -97,6 +97,6 @@ declare namespace wasm_bindgen { | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -136,6 +136,6 @@ * @returns {Promise<void>} | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -142,0 +142,0 @@ * @returns {Promise<void>} |
@@ -97,6 +97,6 @@ declare namespace wasm_bindgen { | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -136,6 +136,6 @@ * @returns {Promise<void>} | ||
/** | ||
* @param {Uint8Array} payload | ||
* @param {any} payload | ||
* @returns {Promise<void>} | ||
*/ | ||
send(payload: Uint8Array): Promise<void>; | ||
send(payload: any): Promise<void>; | ||
/** | ||
@@ -142,0 +142,0 @@ * @returns {Promise<void>} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3442768
16371