Onjsdev Logo
04 Jul 20254 min read
Web DevelopmentJavaScriptNodeJSAxiosReactJSVueJSFetch API

HTTP Request Configuration Explorer


method

HTTP method to use

{ "method": "GET" }

Other Examples

{ "method": "POST" }

{ "method": "PUT" }

{ "method": "DELETE" }

{ "method": "PATCH" }

{ "method": "OPTIONS" }

{ "method": "HEAD" }

url

The request URL or endpoint

{ "url": "https://api.example.com/users" }

Other Examples

{ "url": "https://myapi.com/data" }

{ "url": "https://example.org/items" }

headers

HTTP headers as key-value pairs

{ "headers": { "Content-Type": "application/json" } }

Other Examples

{ "headers": { "Authorization": "Bearer TOKEN" } }

{ "headers": { "Accept": "application/xml" } }

params

URL query parameters (for GET)

{ "params": { "page": 2, "sort": "name" } }

Other Examples

{ "params": { "q": "axios", "limit": 10 } }

data / body

Request body payload

{ "data": { "id": 123, "title": "Hello" } }

Other Examples

{ "data": "raw string body" }

{ "data": new FormData() }

timeout

Max time to wait before aborting

{ "timeout": 5000 }

Other Examples

{ "timeout": 10000 }

{ "timeout": 2000 }

auth

Authentication credentials

{ "auth": { "username": "user", "password": "pass" } }

Other Examples

{ "auth": { "token": "abcd1234" } }

responseType

Expected response format

{ "responseType": "json" }

Other Examples

{ "responseType": "text" }

{ "responseType": "blob" }

{ "responseType": "arraybuffer" }

withCredentials

Send cookies/auth headers?

{ "withCredentials": true }

Other Examples

{ "withCredentials": false }

maxRedirects

Maximum number of redirects

{ "maxRedirects": 5 }

Other Examples

{ "maxRedirects": 0 }

{ "maxRedirects": 10 }

validateStatus

Which HTTP status counts as success?

{ "validateStatus": "(status) => status >= 200 && status < 300" }

onUploadProgress

Callback for upload progress

{ "onUploadProgress": "(event) => handleProgress(event)" }

onDownloadProgress

Callback for download progress

{ "onDownloadProgress": "(event) => handleProgress(event)" }

cache

Cache mode

{ "cache": "no-store" }

Other Examples

{ "cache": "default" }

{ "cache": "reload" }

{ "cache": "force-cache" }

{ "cache": "only-if-cached" }

mode

CORS mode

{ "mode": "cors" }

Other Examples

{ "mode": "no-cors" }

{ "mode": "same-origin" }

credentials

Cookie policy

{ "credentials": "include" }

Other Examples

{ "credentials": "omit" }

{ "credentials": "same-origin" }

referrer

Referrer value

{ "referrer": "client" }

Other Examples

{ "referrer": "https://ref.example.com" }

keepalive

Keep request alive on unload

{ "keepalive": true }

Other Examples

{ "keepalive": false }