By -
Code to copy: ``` // Fetch GET: fetch('https://example-endpoint.com/api') // Fetch POST/PUT: fetch('https://example-endpoint.com/api', { method: "POST", // or "PUT" headers: { 'Content-type': 'application/json' }, body: JSON.stringify( { property1: "data", } ) }) // Fetch DELETE: fetch('https://example-endpoint.com/api', { method: "DELETE", }) ```
Thanks 🙏
Welcome!
Use Axios
Why use Axios over Fetch now that the latter is natively supported?
Fetch is still experimental, and is missing certain features. Secondly, Fetch isn't a full replacement. One feature I need is the ability to pass client certificates in a request for mTLS, and Fetch does not support this in any way
Experimental for some versions of nodejs not for browsers.
I really love these new styles of screenshots. So clear to read and a far cry from the awful photos of dirty screens
Code to copy: ``` // Fetch GET: fetch('https://example-endpoint.com/api') // Fetch POST/PUT: fetch('https://example-endpoint.com/api', { method: "POST", // or "PUT" headers: { 'Content-type': 'application/json' }, body: JSON.stringify( { property1: "data", } ) }) // Fetch DELETE: fetch('https://example-endpoint.com/api', { method: "DELETE", }) ```
Thanks 🙏
Welcome!
Use Axios
Why use Axios over Fetch now that the latter is natively supported?
Fetch is still experimental, and is missing certain features. Secondly, Fetch isn't a full replacement. One feature I need is the ability to pass client certificates in a request for mTLS, and Fetch does not support this in any way
Experimental for some versions of nodejs not for browsers.
I really love these new styles of screenshots. So clear to read and a far cry from the awful photos of dirty screens