http_client
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Attach a postman-like http client to your vals, with bookmarks and history support
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!")
})
Go to https://<author>-<name>.web.val.run/http-client to view the http client UI.
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")
    }
]})
import {httpClient} from "https://esm.town/v/pomdtr/http_client"
export default httpClient((req) => {
   return new Response("Hello World!")
}, {
  path: "/" // show the http client on the website root
})
- fix syntax highlighting on successive request
- allow to prefill the initial request
Migrated from folder: Archive/http_client
Get started with a template:
