Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
HttpResponse Class Reference

Public Member Functions

void switchingProtocols ()
 
void badRequest ()
 
void notFound ()
 
void forbidden ()
 
void authorizationRequired ()
 
void redirect (String location="")
 
void setContentType (const String type)
 
void setCookie (const String name, const String value)
 
void setHeader (const String name, const String value)
 
bool hasHeader (const String name)
 
void setCache (int maxAgeSeconds=3600, bool isPublic=false)
 
void setAllowCrossDomainOrigin (String controlAllowOrigin)
 
String getStatusName ()
 
int getStatusCode ()
 
bool hasBody ()
 
void sendString (const char *string)
 
void sendString (String string)
 
bool sendFile (String fileName, bool allowGzipFileCheck=true)
 
bool sendTemplate (TemplateFileStream *newTemplateInstance)
 
bool sendJsonObject (JsonObjectStream *newJsonStreamInstance)
 
void sendHeader (HttpServerConnection &connection)
 
bool sendBody (HttpServerConnection &connection)