[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1768709094291.jpg (257.21 KB, 1080x599, img_1768709087332_soqi3zw9.jpg)

f6425 No.1122

I recently found myself needing different headers in my requests when testing APIs and thought, hey let me share how easy adding a header is with everyone using good ol’ `curl` - hope this helps you too! Just add the '-H [header key]:[value]' option to your curl command. Here's an example: ```bash $ curl https://myapiurl/data \ -H 'Authorization: Bearer mytoken1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' ```

Source: https://davidwalsh.name/curl-add-header


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">