[{"data":1,"prerenderedAt":149},["ShallowReactive",2],{"blog-post-httpie-add-header":3,"recent-posts":86},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"awME2hIAACcAGIjC","httpie-add-header",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=aw9OCRMAAC4A1DEN&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awME2hIAACcAGIjC%22%29+%5D%5D",[],"2026-11-30T22:45:17+0000",[12],"httpie-how-to-add-a-header",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":39},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","HTTPie: How to Add a Header",[],"ltr","2026-11-30",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to add custom headers to a request using HTTPie",[],{"dimensions":30,"alt":20,"copyright":6,"url":33,"id":34,"edit":35},{"width":31,"height":32},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FOIgiPDsqcWt90ug8_httpie-add-header.png?auto=format,compress","OIgiPDsqcWt90ug8",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,51,54,57,60,64,67,70,73,76,79,83],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have \u003Ccode>HTTPie\u003C\u002Fcode> installed on your computer. If you don't have it yet, you can install it with Homebrew:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install httpie",[],{"type":41,"text":49,"spans":50,"direction":22},"First, open your terminal. To add a header, put the header name, a colon and the value after the URL:",[],{"type":45,"text":52,"spans":53,"direction":22},"http https:\u002F\u002Fexample.com X-Custom-Header:value",[],{"type":41,"text":55,"spans":56,"direction":22},"Just replace \u003Ccode>X-Custom-Header\u003C\u002Fcode> and \u003Ccode>value\u003C\u002Fcode> with your own header. If the value has spaces, wrap the whole header in quotes, and to send more than one, list them with spaces in between:",[],{"type":45,"text":58,"spans":59,"direction":22},"http https:\u002F\u002Fexample.com 'X-Custom-Header:Hello World' X-Foo:Bar",[],{"type":61,"text":62,"spans":63,"direction":22},"heading3","Remove or Empty a Header",[],{"type":41,"text":65,"spans":66,"direction":22},"To remove a header HTTPie adds by default, leave the value empty after the colon, like \u003Ccode>Accept:\u003C\u002Fcode>. To send a header with an empty value, put a semicolon after the name instead of a colon, like \u003Ccode>X-Empty-Header;\u003C\u002Fcode>. Be careful: \u003Ccode>X-Empty-Header:;\u003C\u002Fcode> sends a real \u003Ccode>;\u003C\u002Fcode> as the value.",[],{"type":45,"text":68,"spans":69,"direction":22},"http https:\u002F\u002Fexample.com Accept: 'X-Empty-Header;'",[],{"type":61,"text":71,"spans":72,"direction":22},"Read a Header From a File",[],{"type":41,"text":74,"spans":75,"direction":22},"Use \u003Ccode>:@\u003C\u002Fcode> to read the value from a file, so your token never shows up in your shell history:",[],{"type":45,"text":77,"spans":78,"direction":22},"http https:\u002F\u002Fexample.com Authorization:@token.txt",[],{"type":80,"oembed":81},"embed",{"embed_url":82,"type":80},"",{"type":41,"text":84,"spans":85,"direction":22},"To check exactly which headers you're sending, add \u003Ccode>-v\u003C\u002Fcode>, or \u003Ccode>--offline\u003C\u002Fcode> to print the request without sending it.",[],{"results":87,"page":37,"results_per_page":147,"results_size":147,"total_results_size":148,"total_pages":37},[88,109,128],{"id":89,"uid":90,"url":6,"type":7,"href":91,"tags":92,"first_publication_date":93,"last_publication_date":93,"slugs":94,"linked_documents":96,"lang":14,"alternate_languages":97,"data":98},"awSq3hIAACgAGxuI","eza-alias-ls","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=aw9OCRMAAC4A1DEN&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awSq3hIAACgAGxuI%22%29+%5D%5D",[],"2026-12-01T22:45:29+0000",[95],"eza-how-to-alias-ls",[],[],{"image":99,"title":105},{"dimensions":100,"alt":101,"copyright":6,"url":102,"id":103,"edit":104},{"width":31,"height":32},"eza: How to Alias ls to eza","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FQf3662ULhYvTAcjG_eza-alias-ls.png?auto=format,compress","Qf3662ULhYvTAcjG",{"x":36,"y":36,"zoom":37,"background":38},[106],{"type":19,"text":107,"spans":108,"direction":22},"eza: How to Alias \"ls\"",[],{"id":110,"uid":111,"url":6,"type":7,"href":112,"tags":113,"first_publication_date":93,"last_publication_date":93,"slugs":114,"linked_documents":116,"lang":14,"alternate_languages":117,"data":118},"awSqwxIAACsAGxtS","httpie-use-sessions","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=aw9OCRMAAC4A1DEN&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awSqwxIAACsAGxtS%22%29+%5D%5D",[],[115],"httpie-how-to-use-sessions",[],[],{"image":119,"title":125},{"dimensions":120,"alt":121,"copyright":6,"url":122,"id":123,"edit":124},{"width":31,"height":32},"HTTPie: How to Use Sessions","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FIySRJuI1ZCXHcLeW_httpie-use-sessions.png?auto=format,compress","IySRJuI1ZCXHcLeW",{"x":36,"y":36,"zoom":37,"background":38},[126],{"type":19,"text":121,"spans":127,"direction":22},[],{"id":129,"uid":130,"url":6,"type":7,"href":131,"tags":132,"first_publication_date":93,"last_publication_date":93,"slugs":133,"linked_documents":135,"lang":14,"alternate_languages":136,"data":137},"awSqwBIAACkAGxtG","httpie-basic-auth","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=aw9OCRMAAC4A1DEN&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awSqwBIAACkAGxtG%22%29+%5D%5D",[],[134],"httpie-how-to-use-basic-auth",[],[],{"image":138,"title":144},{"dimensions":139,"alt":140,"copyright":6,"url":141,"id":142,"edit":143},{"width":31,"height":32},"HTTPie: How to Use Basic Auth","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FoeeGqoCmCzrcpTfb_httpie-basic-auth.png?auto=format,compress","oeeGqoCmCzrcpTfb",{"x":36,"y":36,"zoom":37,"background":38},[145],{"type":19,"text":140,"spans":146,"direction":22},[],3,114,1796165153225]