httpclient(1)

πŸ’– httpclient β€” the manual, but make it cute πŸ’–

okay bestie, so this is the page for httpclient from the General Commands Manual β€” yeah the section-1 girlies. it's a Shell command for performing HTTP requests using Ruby httpclient, and ngl she eats every single time. let's get into it πŸ’…


✨ NAME ✨

httpclient β€” a shell command for performing HTTP requests using Ruby httpclient. that's the whole vibe. periodt.


πŸŽ€ SYNOPSIS πŸŽ€

httpclient <method> <uri> [params]
httpclient

like… two whole moods. one with the deets, one with literally nothing. both valid. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, this program is an example/companion to the Ruby httpclient module β€” but here's the thing bestie, she's not just a lil sidekick, she can be used as a complete standalone HTTP client. main character energy fr fr. πŸ‘‘

if you invoke her with a method and a URI, the specified URI will be requested via the method given from its server. and the allowed methods are:

  • head
  • get
  • post
  • put
  • delete
  • options
  • propfind
  • proppatch
  • trace

that's the whole roster. no additions, no substitutions. ✨

now, parameters can be specified as a third parameter and will be delivered accordingly β€” meaning, lowkey, they get appended to the URI after a ? sign if the method is get, but they become the posted body if the method is post. context-dependent delivery, very demure.

⚠️ important bestie: please note that no checks are done as to whether the requested parameters make sense in the context they are specified. they are just sent as-is. she does not judge, she does not validate, she simply ships it. 😭

example time:

$ httpclient get https://www.google.co.jp/ q=ruby

iconic. ate. no crumbs.


also!! starting from version 2.6.0, httpclient supports command download. like, she leveled up. 🧚

$ httpclient download http://host/path > file

the > is doing the heavy lifting there, redirecting it right into file. chef's kiss.


and if no parameters are specified, an interactive Ruby (irb) session will be opened, binding an HTTPClient object as 'self'. so you're literally in it. you're the client. you're the moment. πŸ’œ

you can then call HTTPClient instance methods like:

$ httpclient
       >> get "https://www.google.co.jp/", :q => :ruby

(yes that's the actual indentation vibe, we're keeping it, it's giving console.)

and here's what she prints, in this exact order, every time:

  1. the wiredump of your request β€” that is, the commands sent to the server via HTTP
  2. the request's headers
  3. and finally, the result

wiredump β†’ headers β†’ result. a three-course meal. πŸ“


πŸ’… OPTIONS πŸ’…

okay so… the OPTIONS section is empty. no flags, no switches, no --help, nothing. she has no options because she is the option. slay I guess?? 😭✨


πŸ‘‘ AUTHOR πŸ‘‘

Gunnar Wolf <gwolf@debian.org>

that's the queen who wrote her. put some respect on the name. 🫑


🌸 NOTES 🌸

this manual page was written by Gunnar Wolf <gwolf@debian.org> for the Debian project, but can be freely used by others. sharing is caring bestie. 🫢

and also:

this is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

read that twice if you gotta. it's giving legal but make it generous. πŸ’–


and that's the whole page!! this one was dated 2013-06-10 and lives in the httpclient(1) slot of the manual β€” an absolute classic, still serving looks a decade later. bye bestie, go make some HTTP requests πŸ’…πŸŒˆβ­

πŸ“¦ where this page comes from