cgiSetType(3)

πŸ“¦ version 0.6, in ubuntu jammy

✨ cgiSetType(3) ✨

okay bestie, gather round, we're doing a lil manual page reading and it's giving library internals but honestly? kinda iconic of you to want to know this πŸ’…

This one lives in the Programmer's Manual, and it's your girl cgiSetType β€” the function that tells the world what kind of thing you're about to serve. πŸŽ€


🌸 NAME 🌸

cgiSetType β€” specify the result type. that's it, that's the whole vibe ✨


πŸ¦‹ SYNOPSYS πŸ¦‹

(no bc the original literally spells it like that and I'm not gonna gaslight you about it 😭)

#include <cgi.h>

int cgiSetType (char *type);

πŸ’– DESCRIPTION πŸ’–

so like, this routine sets the result type to type. that's the whole job. she's simple, she's focused, she ate and left no crumbs. πŸ‘‘

it's optional, fr β€” you do not have to call it if you don't want to. the default is already "text/html", so if you're serving regular HTML you can just... not. no pressure. 🫢

when you do set it, this is the value that gets used by cgiHeader(3). so like, cgiSetType picks the outfit and cgiHeader is the one who actually walks out and shows it to everybody. matching energy, honestly. πŸ’œ


🌈 RETURN VALUE 🌈

  • on success, 1 is returned πŸŽ‰
  • otherwise, 0 🫠

no in-between, no gray area, it's a yes-or-no situation and we respect the clarity.


πŸ‘‘ AUTHOR πŸ‘‘

This CGI library is written by Martin Schulze <joey@infodrom.org>. If you have additions or improvements, please get in touch with him β€” like, actually do it, bestie, he said so πŸ“¬πŸ’Œ


🧚 SEE ALSO 🧚

iykyk, go read the whole lil family, they're all connected πŸ¦‹


CGI Library β€” last touched 6 April 2008 πŸ’« that's the version and the date, babes, so if you're reading this in the future just know this page is lowkey vintage and aging like a fine little manpage. mwah 😘 πŸ’–

πŸ“¦ where this page comes from
  • ubuntu jammy: cgilib 0.6-1.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms