[{"data":1,"prerenderedAt":149},["ShallowReactive",2],{"blog-post-httpie-send-json":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},"awSqvBIAAC0AGxs6","httpie-send-json",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axCfhxMAACkA1kxo&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awSqvBIAAC0AGxs6%22%29+%5D%5D",[],"2026-12-01T22:45:29+0000",[12],"httpie-how-to-send-json",[],"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 Send JSON",[],"ltr","2026-12-01",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to send JSON payloads, nested objects, and files 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\u002FHjf__K4d4I14VrG3_httpie-send-json.png?auto=format,compress","Hjf__K4d4I14VrG3",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,52,55,58,61,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, install it with Homebrew:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install httpie",[],{"type":49,"text":50,"spans":51,"direction":22},"heading3","Send JSON Key-Value Pairs",[],{"type":41,"text":53,"spans":54,"direction":22},"HTTPie sends request data as JSON by default, sets the \u003Ccode>Content-Type: application\u002Fjson\u003C\u002Fcode> header automatically, and defaults to a \u003Ccode>POST\u003C\u002Fcode> request whenever you pass data. Use \u003Ccode>=\u003C\u002Fcode> for strings and \u003Ccode>:=\u003C\u002Fcode> for raw JSON types like numbers, booleans, arrays, and nested objects:",[],{"type":45,"text":56,"spans":57,"direction":22},"http POST https:\u002F\u002Fexample.com name=\"Jane Doe\" age:=30 active:=true roles:='[\"admin\", \"editor\"]' meta:='{\"department\": \"engineering\"}'",[],{"type":41,"text":59,"spans":60,"direction":22},"Just remember to replace \u003Ccode>https:\u002F\u002Fexample.com\u003C\u002Fcode> with your own endpoint. If you want to inspect the exact HTTP request and JSON body before sending anything, add the \u003Ccode>--offline\u003C\u002Fcode> flag.",[],{"type":49,"text":62,"spans":63,"direction":22},"Send Raw JSON or a JSON File",[],{"type":41,"text":65,"spans":66,"direction":22},"For deeply nested payloads or existing files, you can pipe raw JSON via standard input or redirect a local \u003Ccode>.json\u003C\u002Fcode> file:",[],{"type":45,"text":68,"spans":69,"direction":22},"echo '{\"user\": {\"id\": 42, \"status\": \"active\"}}' | http POST https:\u002F\u002Fexample.com",[],{"type":45,"text":71,"spans":72,"direction":22},"http POST https:\u002F\u002Fexample.com \u003C payload.json",[],{"type":41,"text":74,"spans":75,"direction":22},"To embed a JSON file into a single field instead of the whole body, use \u003Ccode>:=@\u003C\u002Fcode> followed by the file name:",[],{"type":45,"text":77,"spans":78,"direction":22},"http POST https:\u002F\u002Fexample.com name=\"Jane\" profile:=@profile.json",[],{"type":80,"oembed":81},"embed",{"embed_url":82,"type":80},"",{"type":41,"text":84,"spans":85,"direction":22},"If you ever need to send an explicit JSON \u003Ccode>Accept\u003C\u002Fcode> header without attaching a request body, just add \u003Ccode>--json\u003C\u002Fcode> (or \u003Ccode>-j\u003C\u002Fcode>) to the command.",[],{"results":87,"page":37,"results_per_page":147,"results_size":147,"total_results_size":148,"total_pages":37},[88,108,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},"awViKBIAACgAHCq8","eza-show-file-sizes","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axCfhxMAACkA1kxo&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awViKBIAACgAHCq8%22%29+%5D%5D",[],"2026-12-02T22:45:26+0000",[95],"eza-how-to-show-file-sizes",[],[],{"image":99,"title":105},{"dimensions":100,"alt":101,"copyright":6,"url":102,"id":103,"edit":104},{"width":31,"height":32},"eza: How to Show File Sizes","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FUpKz_y1Rt8NcxxKd_eza-show-file-sizes.png?auto=format,compress","UpKz_y1Rt8NcxxKd",{"x":36,"y":36,"zoom":37,"background":38},[106],{"type":19,"text":101,"spans":107,"direction":22},[],{"id":109,"uid":110,"url":6,"type":7,"href":111,"tags":112,"first_publication_date":93,"last_publication_date":93,"slugs":113,"linked_documents":115,"lang":14,"alternate_languages":116,"data":117},"awViIhIAAC0AHCqe","eza-install-mac","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axCfhxMAACkA1kxo&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awViIhIAAC0AHCqe%22%29+%5D%5D",[],[114],"how-to-install-eza-on-macos-27",[],[],{"image":118,"title":124},{"dimensions":119,"alt":120,"copyright":6,"url":121,"id":122,"edit":123},{"width":31,"height":32},"eza: How to Install eza on Mac","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FNBBJX1Ht34d3UJ5R_eza-install-mac.png?auto=format,compress","NBBJX1Ht34d3UJ5R",{"x":36,"y":36,"zoom":37,"background":38},[125],{"type":19,"text":126,"spans":127,"direction":22},"How to Install eza on macOS 27",[],{"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},"awViKxIAAC0AHCrL","eza-show-git-status","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axCfhxMAACkA1kxo&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awViKxIAAC0AHCrL%22%29+%5D%5D",[],[134],"eza-how-to-show-git-status",[],[],{"image":138,"title":144},{"dimensions":139,"alt":140,"copyright":6,"url":141,"id":142,"edit":143},{"width":31,"height":32},"eza: How to Show Git Status","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FfpEwsos0S0CTuwSN_eza-show-git-status.png?auto=format,compress","fpEwsos0S0CTuwSN",{"x":36,"y":36,"zoom":37,"background":38},[145],{"type":19,"text":140,"spans":146,"direction":22},[],3,118,1796251550719]