Avatar

agmm

Joined February 28, 2024
Likes
8
pomdtr avatar
pomdtr
http_client
HTTP
HTTP Client Attach a postman-like http client to your vals, with bookmarks and history support Usage Wrap your http handler in an the httpClient middleware. import {httpClient} from "https://esm.town/v/pomdtr/http_client" export default httpClient((req) => { return new Response("Hello World!") }) The http client will be shown on the root. Adding bookmarks You might want to bookmark some requests you need often. You can do it by passing a bookmark list as a middleware option: import {httpClient} from "https://esm.town/v/pomdtr/http_client" export default httpClient((req) => { return new Response("Hello World!") }, { bookmarks: [ { "label": "Dummy Request", "request": new Request("https://dummyjson.com/products") } ]}) Customizing the client path import {httpClient} from "https://esm.town/v/pomdtr/http_client" export default httpClient((req) => { return new Response("Hello World!") }, { path: "/http-client" }) TODO [ ] fix syntax highlighting on successive request [ ] allow to prefill the initial request
7
andreterron avatar
andreterron
examplePDF
HTTP
Forked from vtdocs/examplePDF
4
neverstew avatar
neverstew
viewSource
HTTP
View source code Just like a right click + inspect on desktop, except available on mobile too! Just write the website after the / e.g. https://neverstew-viewSource.web.val.run/bbc.co.uk
2
stevekrouse avatar
stevekrouse
insecureSSLCertExample
Script
This is an example call of @stevekrouse/insecureFetch
2
ije avatar
ije
md
Script
md A Markdown renderer written in Zig & C, compiled to WebAssymbly for val.town - https://github.com/ije/md4w import { render } from "https://esm.town/v/ije/md" render("Stay _foolish_, stay **hungry**!") // -> <p>Stay <em>foolish</em>, stay <strong>hungry</strong>!</p>
2
andreterron avatar
andreterron
rootValRef
Script
An interactive, runnable TypeScript val by andreterron
2
stevekrouse avatar
stevekrouse
json_viewer
Script
Inspector to browser json data in HTTP vals Example: https://val.town/v/stevekrouse/weatherDescription Thanks @mmcgrana (https://markmcgranaghan.com/) for the idea!
7
pomdtr avatar
pomdtr
extractValInfo
Script
Extract vals infos (author, name, version) from a val url (either from esm.town or val.town ). Example usage: const {author, name} = extractValInfo(import.meta.url) Also returns a unique slug for the val: <author>/<name>
15
Next