cgiSetType(3)
β¨ 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,
1is 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
- Copyright (c) 1999,2008 by Martin Schulze <joey@infodrom.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms