HTTP 請求建構器
以視覺化方式建立 API 端點請求,並產生 JavaScript Fetch 程式碼。
標頭資料
請求內文資料(原始)
原生 Fetch() 包裝程式碼
fetch("https://api.example.com/v1/auth/login", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer token123",
},
body: JSON.stringify({
"username": "admin",
"password": "supersecurepassword"
}),
})
.then((response) => response.json())
.then((data) => console.log(data));