topical media & game development

talk show tell print

lib-ch-example-ref-wcgi-addHeader.cgi / cgi



  #!/bin/ch
  /* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
  include <wcgi.h>
  
  int main() {
    class CResponse Response;
    chchar *headerName=L"Content-Disposition";
    chchar *headerValue = L"attachment; filename=\"test addHeader.ch, please click cancel\"";
  
    Response.setContentType(L"application/testaddHeader");
    Response.addHeader(headerName, headerValue);
    Response.begin();
    Response.title(L"Test of Response.addHeader");
    printf("<H1> Test of Response.setStatus and Response.getStatus </H1> 
\n"); printf("The header has been sent to the client."); 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.