Hacker News new | past | comments | ask | show | jobs | submit login

One step up from 'curl' and 'jq' is to only target modern browsers supporting Javascript ES6.

Just create a static HTML file and a script loaded as an ES6 module.

Use the Fetch API for obtaining data from your API. Obtain DOM elements using 'document.querySelector()'. Update the DOM using Javascript template literals (strings) and the 'Element.innerHTML' attribute.

For forms, just do a server side redirect after POST or respond with HTTP 201 or 204. Alternatively, add a Javascript submit event listener to the form and do the HTTP POST using a 'FormData' object and the Fetch API.

For authorization, either a catch all HTTP Basic Auth in the web server or a HTML login form to your API responding with a session cookie and a redirect.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact