Rudiments

httpresponse.h
1 // Copyright (c) 1999-2018 David Muse
2 // See the COPYING file for more information
3
4 #ifndef RUDIMENTS_HTTPRESPONSE_H
5 #define RUDIMENTS_HTTPRESPONSE_H
6
7 #include <rudiments/private/httpresponseincludes.h>
8
11 class RUDIMENTS_DLLSPEC httpresponse : public output {
12 public:
13 httpresponse(httpserverapi *sapi);
14 virtual ~httpresponse();
15
19 void textHtml();
20
24 void textPlain();
25
30 void contentType(const char *type, const char *subtype);
31
39 void contentType(const char *type, const char *subtype,
40 const char *charset);
41
50 void contentType(const char *type, const char *subtype,
51 const char *charset,
52 const char *boundary);
53
55 void cr();
56
58 void status(const char *protocol,
59 const char *protocolversion,
60 const char *code);
61
63 void setCookie(const char *name, const char *value,
64 const char *domain, const char *path,
65 const char *expires, bool secure);
66
69 const char *boundaryString();
70
72 void multiPartBoundary(output *out);
73
75 void multiPartEnd(output *out);
76
78 httpresponse *status(const char *status);
79
81 httpresponse *header(const char *header);
82
84 httpresponse *header(const char *header,
85 const char *value);
86
87 ssize_t write(const unsigned char *string, size_t size);
88 ssize_t write(const char *string);
89 ssize_t write(const char *string, size_t length);
90 ssize_t write(char character);
91 ssize_t write(int16_t number);
92 ssize_t write(int32_t number);
93 ssize_t write(int64_t number);
94 ssize_t write(unsigned char character);
95 ssize_t write(uint16_t number);
96 ssize_t write(uint32_t number);
97 ssize_t write(uint64_t number);
98 ssize_t write(float number);
99 ssize_t write(double number);
100
102 ssize_t write(file *filebuffer);
103
104 #include <rudiments/private/httpresponse.h>
105
106 };
107
108 #endif
character
Definition: character.h:11
file
Definition: file.h:19
httpresponse
Definition: httpresponse.h:11
httpresponse::textPlain
void textPlain()
httpresponse::multiPartBoundary
void multiPartBoundary(output *out)
httpresponse::contentType
void contentType(const char *type, const char *subtype)
httpresponse::textHtml
void textHtml()
httpresponse::status
void status(const char *protocol, const char *protocolversion, const char *code)
httpresponse::write
ssize_t write(file *filebuffer)
httpresponse::cr
void cr()
httpresponse::header
httpresponse * header(const char *header)
httpresponse::status
httpresponse * status(const char *status)
httpresponse::setCookie
void setCookie(const char *name, const char *value, const char *domain, const char *path, const char *expires, bool secure)
httpresponse::contentType
void contentType(const char *type, const char *subtype, const char *charset, const char *boundary)
httpresponse::contentType
void contentType(const char *type, const char *subtype, const char *charset)
httpresponse::boundaryString
const char * boundaryString()
httpresponse::multiPartEnd
void multiPartEnd(output *out)
httpresponse::header
httpresponse * header(const char *header, const char *value)
httpserverapi
Definition: httpserverapi.h:9
output
Definition: output.h:9