PREQUEST3(1)

πŸ“¦
version 2.0.2 Β· 5 versions
, in debian trixie, ubuntu resolute

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

okay so bestie, you opened the manual for prequest3, and it lives in section 1 of the manual β€” that's User Commands territory, the section for actual runnable programs. it's the Python 3 Pyramid command. let's get into it fr fr ✨


🌸 NAME 🌸

prequest3 β€” Python 3 Pyramid command. that's it, that's the name, short and iconic πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the whole vibe. the usage looks like this:

usage: prequest3 [-h] [-n NAME] [--header NAME:VALUE] [-d]
       [-m {GET,HEAD,POST,PUT,PATCH,DELETE,PROPFIND,OPTIONS}] [-l LOGIN]
       [config_uri] [path_info] [config_vars ...]

Submit a HTTP request to a web application. 🫢

basically this command makes an artificial request to a web application that uses a PasteDeploy (.ini) configuration file β€” for both the server and the application. it's not hitting a real socket, it's just... manifesting the request directly into the app. main character energy πŸ’…

here's the little lineup of ways to use it, straight from the source:

  • Use prequest config.ini /path to request /path. ⭐
  • Use prequest --method=POST config.ini /path < data to do a POST with the given request body.
  • Use prequest --method=PUT config.ini /path < data to do a PUT with the given request body.
  • Use prequest --method=PATCH config.ini /path < data to do a PATCH with the given request body.
  • Use prequest --method=OPTIONS config.ini /path to do an OPTIONS request.
  • Use prequest --method=PROPFIND config.ini /path to do a PROPFIND request.

(yes bestie, every one of those is literally spelled prequest, not prequest3, i don't make the rules, i just report them 😭)

okay now the path rules, and this part matters so listen up:

  • if the path is relative (meaning it doesn't begin with /) it gets interpreted as relative to /.
  • the path you pass to this script should be URL-quoted. no cap.
  • the path can be succeeded with a query string, like '/path?a=1&=b2'.

and here's a lil gift for your app: the variable environ['paste.command_request'] will be set to True in the request's WSGI environment. so your application can tell these calls apart from normal requests. it's giving "i have a secret handshake" 🀝✨


πŸŽ€ positional arguments: πŸŽ€

  • config_uri β€” the URI to the configuration file. this is the whole blueprint, bestie.
  • path_info β€” the path of the request. where you wanna go πŸ›£οΈ
  • config_vars β€” variables required by the config file. for example, http_port=%(http_port)s would expect http_port=8080 to be passed here. it's plugging values into the blanks 🧩

πŸ’… options: πŸ’…

  • -h, --help β€” show this help message and exit. the classic escape hatch, always there for you 🫢
  • -n NAME, --app-name NAME β€” load the named application from the config file (default 'main'). so if you've got a different app in there, this is how you call it by name πŸ‘‘
  • --header NAME:VALUE β€” header to add to request. and the way that you can use this option multiple times?? obsessed. stack those headers πŸ’–
  • -d, --display-headers β€” display status and headers before the response body. so you can see the receipts first πŸ”
  • -m {GET,HEAD,POST,PUT,PATCH,DELETE,PROPFIND,OPTIONS}, --method {GET,HEAD,POST,PUT,PATCH,DELETE,PROPFIND,OPTIONS} β€” request method type (GET, POST, PUT, PATCH, DELETE, PROPFIND, OPTIONS). pick your fighter βš”οΈ
  • -l LOGIN, --login LOGIN β€” HTTP basic auth username:password pair. the username:password combo, colon included, don't forget it πŸ”

⚠️ quick note bestie: the path really does need to be URL-quoted, and relative paths get resolved against /. that's not me being dramatic, that's just the rules πŸ’€

and that's the whole page, bestie!! 🌈 this was prequest3 version 2.0.2+dfsg-1, dated December 2024. ty for reading, go make some artificial requests, slay βœ¨πŸ’–πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from