topical media & game development
lib-ch-example-ref-cgi-setContentType.cgi / cgi
#!/bin/ch
/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
include <cgi.h>
int main() {
class CResponse Response;
chchar *contentType_def, *contentType_cur;
// get default content type
contentType_def = Response.getContentType();
// set current content type to "text/plain"
Response.setContentType("text/plain");
// get current content type
contentType_cur = Response.getContentType();
Response.begin();
printf("Test of Response.setContentType and Response.getContentType\n");
printf("The Default Content Type is : \%s \n", contentType_def);
printf("The Current Content Type is : \%s \n", contentType_cur);
Response.end();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.