From 1a0119776473f1395d1957f788368db1cd97fd06 Mon Sep 17 00:00:00 2001 From: Toshit Chawda Date: Sat, 27 Jul 2024 12:07:50 -0700 Subject: [PATCH] update usage example --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index 8780008..99d4af8 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,13 @@ Epoxy is an encrypted proxy for browser javascript. It allows you to make reques Epoxy must be served with the [security headers needed for `SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements). Here is a simple usage example: ```javascript import epoxy from "./epoxy-module-bundled.js"; -import ROOTS from "./pkg/certs-module.js"; -// or -// importScripts("epoxy-bundled.js"); -// importScripts("certs.js"); const { EpoxyClient, EpoxyClientOptions } = await epoxy(); let options = new EpoxyClientOptions(); options.user_agent = navigator.userAgent; -let client = await new EpoxyClient("wss://localhost:4000", ROOTS, options); +let client = await new EpoxyClient("wss://localhost:4000", options); let response = await client.fetch("https://httpbin.org/get"); console.log(await response.text());