Published:

React + Fetch - Logout on 401 Unauthorized or 403 Forbidden HTTP Response

A quick example of how to automatically logout of a React app if a fetch request returns a 401 Unauthorized or 403 Forbidden response
Published:

Vue 2/3 + Axios - Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for axios requests from Vue.js (v2 or v3) to an API when the user is authenticated
Published:

React + Axios - Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for axios requests from React to an API when the user is authenticated
Published:

Angular - HTTP Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for HTTP requests from Angular to an API when the user is authenticated
Published:

React Hook Form - Reset form with default values and clear errors

An example of how to reset a React Hook Form with default values and clear form validation error messages.
Published:

Fetch + Vanilla JS - Check if HTTP Response is JSON in JavaScript

This is a quick example of how to check that the response type is JSON for an HTTP request sent the Fetch API (fetch()) which comes bundled with all modern browsers.
Published:

Fetch - HTTP DELETE Request Examples

A quick set of examples to show how to send HTTP DELETE requests to an API using fetch
Published:

Fetch - HTTP PUT Request Examples

A quick set of examples to show how to send HTTP PUT requests to an API using fetch
Published:

React Hook Form - Set form values in useEffect hook after async data load

A quick example of how to set field values in a React Hook Form after loading data asynchronously (e.g. from an API request) with a useEffect hook
Published:

Node.js - Simple Proxy to Pass Through HTTP Requests to an External URL

This is a quick example of how to proxy an HTTP request through a Node.js server to an external URL and return the response.
Supported by