HttpResponse.h
Go to the documentation of this file.
bool sendNamedStream(IDataSourceStream *newDataStream)
Parse and send stream, using the name to determine the content type.
HttpResponse * setContentType(const String &type)
Definition: HttpResponse.h:37
HttpResponse * setAllowCrossDomainOrigin(const String &controlAllowOrigin)
Definition: HttpResponse.h:59
bool isSuccess()
Determine if the response status indicates success.
Definition: HttpResponse.h:134
HttpResponse * setContentType(enum MimeType type)
Definition: HttpResponse.h:43
bool sendString(const String &text)
String toString() const
Tries to present a readable version of the current response values.
HttpResponse * setHeader(const String &name, const String &value)
Definition: HttpResponse.h:50
bool sendFile(const String &fileName, bool allowGzipFileCheck=true)
Send file by name.
String getBody()
Moves content from the body stream into a String.
Definition: HttpResponse.h:106
bool sendDataStream(IDataSourceStream *newDataStream, enum MimeType type)
Send data from the given stream object.
Definition: HttpResponse.h:85
HttpResponse * setCookie(const String &name, const String &value, bool append=false)
ReadWriteStream * buffer
Internal stream for storing strings and receiving responses.
Definition: HttpResponse.h:151
virtual bool moveString(String &s)
Memory-based streams may be able to move content into a String.
Definition: DataSourceStream.h:190
HttpResponse * setCache(int maxAgeSeconds=3600, bool isPublic=false)
void setBuffer(ReadWriteStream *buffer)
Called by connection to specify where incoming response data is written.
Represents either an incoming or outgoing response to a HTTP request.
Definition: HttpResponse.h:25
1.8.13