Public
Script
Forked from stevekrouse/insecureSSLCertExample
March 28, 2024
1
2
3
4
5
6
7
8
9
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
const proxyURL = new URL("https://unsecure-fetch.val-town.workers.dev");
proxyURL.searchParams.set("url", url);
// console.debug("proxyUrl: %s", proxyURL);
// ==> proxyUrl: https://unsecure-fetch.val-town.workers.dev/?url=https%3A%2F%2Fassignment-api.uspto.gov%2Fpatent%2FbasicSearch%3Fquery%3D1234567%26fields%3Dmain%26rows%3D20
console.log(await fetchText(proxyURL.href));
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
March 28, 2024