Formatting
Axios generator fills in a URL, a method, optional headers and an optional body, then prints an import and an axios() call. A POST to https://example.test/api with Content-Type: application/json and the body {"name":"Sam"} becomes an axios config whose data field is the JSON text, not a parsed object. The snippet logs response.data.
The page does not perform the request. There is no network call to example.test, which matters when the URL is a production host and the body is a real payload you are only trying to document. Header names are lowercased in the output, so Content-Type is written content-type. Repeated header names are rejected.
The URL has to be absolute http or https, with no username or password embedded. Snippet format is fixed to axios on this page. The HTTP request builder is the one that can emit curl, fetch, Python, Go or PHP from the same fields.
URL https://example.test/api, method POST, header Content-Type: application/json, body {"name":"Sam"}.
import axios from "axios"; then axios({ url, method: "POST", headers: { "content-type": "application/json" }, data: "{\"name\":\"Sam\"}" }) and console.log(response.data).
The data field stays a string, so you can see the bytes you asked to send instead of an object Axios might reshape later.
No. It only prints code. example.test is never contacted, which is what you want when the URL is real and you are still drafting.
The body field is copied through as text. If you typed JSON, the snippet contains that JSON text. Axios is not asked to JSON.stringify it again.
Header names are normalized to lowercase in the generated call. HTTP treats those names as case-insensitive.
Use the fetch snippet page, or the HTTP request builder and change Snippet format. This page stays on Axios.