SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <http.h>
Static Public Member Functions | |
static bool | IsHtmlFExt (const TStr &FExt) |
static bool | IsGifFExt (const TStr &FExt) |
static TStr | GetReasonPhrase (const int &StatusCd) |
Static Public Attributes | |
static const TStr | HttpStr = "http" |
static const TStr | SlashStr = "/" |
static const TStr | ColonStr = ":" |
static const TStr | ContTypeFldNm = "Content-Type" |
static const TStr | ContLenFldNm = "Content-Length" |
static const TStr | HostFldNm = "Host" |
static const TStr | AcceptRangesFldNm = "Accept-Ranges" |
static const TStr | CacheCtrlFldNm = "Cache-Control" |
static const TStr | AcceptFldNm = "Accept" |
static const TStr | SrvFldNm = "Server" |
static const TStr | ConnFldNm = "Connection" |
static const TStr | FetchIdFldNm = "FetchId" |
static const TStr | LocFldNm = "Location" |
static const TStr | SetCookieFldNm = "Set-Cookie" |
static const TStr | CookieFldNm = "Cookie" |
static const TStr | TextFldVal = "text/" |
static const TStr | TextPlainFldVal = "text/plain" |
static const TStr | TextHtmlFldVal = "text/html" |
static const TStr | TextXmlFldVal = "text/xml" |
static const TStr | TextWmlFldVal = "text/vnd.wap.wml" |
static const TStr | TextJavaScriptFldVal = "text/javascript" |
static const TStr | TextCssFldVal = "text/css" |
static const TStr | ImageIcoFldVal = "image/x-icon" |
static const TStr | ImagePngFldVal = "image/png" |
static const TStr | ImageGifFldVal = "image/gif" |
static const TStr | ImageJpgFldVal = "image/jpg" |
static const TStr | AppOctetFldVal = "application/octet-stream" |
static const TStr | AppSoapXmlFldVal = "application/soap+xml" |
static const TStr | AppW3FormFldVal = "application/x-www-form-urlencoded" |
static const TStr | AppJSonFldVal = "application/json" |
static const TStr | ConnKeepAliveFldVal = "keep-alive" |
static const int | DfPortN = 80 |
static const int | OkStatusCd = 200 |
static const int | RedirStatusCd = 300 |
static const int | BadRqStatusCd = 400 |
static const int | ErrStatusCd = 400 |
static const int | ErrNotFoundStatusCd = 404 |
static const int | InternalErrStatusCd = 500 |
static const TStr | GetMethodNm = "GET" |
static const TStr | HeadMethodNm = "HEAD" |
static const TStr | PostMethodNm = "POST" |
static const TStr | UndefMethodNm = "UndefinedMethod" |
TStr THttp::GetReasonPhrase | ( | const int & | StatusCd | ) | [static] |
Definition at line 62 of file http.cpp.
References TInt::GetStr().
Referenced by THttpResp::GetReasonPhrase().
{ switch (StatusCd){ case 200: return "OK"; case 201: return "Created"; case 202: return "Accepted"; case 204: return "No Content"; case 300: return "Multiple Choices"; case 301: return "Moved Permanently"; case 302: return "Moved Temporarily"; case 304: return "Not Modified"; case 400: return "Bad Request"; case 401: return "Unauthorized"; case 403: return "Forbidden"; case 404: return "Not Found"; case 500: return "Internal Server Error"; case 501: return "Not Implemented"; case 502: return "Bad Gateway"; case 503: return "Service Unavailable"; default: return TStr("Unknown Status Code ")+TInt::GetStr(StatusCd); } }
bool THttp::IsGifFExt | ( | const TStr & | FExt | ) | [static] |
Definition at line 47 of file http.cpp.
References TStr::GetUc(), and TFile::GifFExt.
{ return (FExt.GetUc()==TFile::GifFExt.GetUc()); }
bool THttp::IsHtmlFExt | ( | const TStr & | FExt | ) | [static] |
Definition at line 42 of file http.cpp.
References TStr::GetUc(), TFile::HtmFExt, and TFile::HtmlFExt.
{ TStr UcFExt=FExt.GetUc(); return ((UcFExt==TFile::HtmlFExt.GetUc())||(UcFExt==TFile::HtmFExt.GetUc())); }
const TStr THttp::AcceptFldNm = "Accept" [static] |
const TStr THttp::AcceptRangesFldNm = "Accept-Ranges" [static] |
const TStr THttp::AppJSonFldVal = "application/json" [static] |
const TStr THttp::AppOctetFldVal = "application/octet-stream" [static] |
const TStr THttp::AppSoapXmlFldVal = "application/soap+xml" [static] |
const TStr THttp::AppW3FormFldVal = "application/x-www-form-urlencoded" [static] |
const int THttp::BadRqStatusCd = 400 [static] |
const TStr THttp::CacheCtrlFldNm = "Cache-Control" [static] |
const TStr THttp::ColonStr = ":" [static] |
const TStr THttp::ConnFldNm = "Connection" [static] |
const TStr THttp::ConnKeepAliveFldVal = "keep-alive" [static] |
const TStr THttp::ContLenFldNm = "Content-Length" [static] |
Definition at line 13 of file http.h.
Referenced by THttpRq::IsContLen(), and THttpResp::IsContLen().
const TStr THttp::ContTypeFldNm = "Content-Type" [static] |
Definition at line 12 of file http.h.
Referenced by THttpRq::IsContType(), and THttpResp::IsContType().
const TStr THttp::CookieFldNm = "Cookie" [static] |
const int THttp::DfPortN = 80 [static] |
Definition at line 46 of file http.h.
Referenced by TUrl::GetAbs().
const int THttp::ErrNotFoundStatusCd = 404 [static] |
const int THttp::ErrStatusCd = 400 [static] |
const TStr THttp::FetchIdFldNm = "FetchId" [static] |
const TStr THttp::GetMethodNm = "GET" [static] |
const TStr THttp::HeadMethodNm = "HEAD" [static] |
const TStr THttp::HostFldNm = "Host" [static] |
const TStr THttp::HttpStr = "http" [static] |
const TStr THttp::ImageGifFldVal = "image/gif" [static] |
const TStr THttp::ImageIcoFldVal = "image/x-icon" [static] |
const TStr THttp::ImageJpgFldVal = "image/jpg" [static] |
const TStr THttp::ImagePngFldVal = "image/png" [static] |
const int THttp::InternalErrStatusCd = 500 [static] |
const TStr THttp::LocFldNm = "Location" [static] |
const int THttp::OkStatusCd = 200 [static] |
Definition at line 48 of file http.h.
Referenced by THttpResp::IsStatusCd_Ok().
const TStr THttp::PostMethodNm = "POST" [static] |
const int THttp::RedirStatusCd = 300 [static] |
Definition at line 49 of file http.h.
Referenced by THttpResp::IsStatusCd_Redir().
const TStr THttp::SetCookieFldNm = "Set-Cookie" [static] |
const TStr THttp::SlashStr = "/" [static] |
const TStr THttp::SrvFldNm = "Server" [static] |
Definition at line 18 of file http.h.
Referenced by THttpResp::GetSrvNm().
const TStr THttp::TextCssFldVal = "text/css" [static] |
const TStr THttp::TextFldVal = "text/" [static] |
Definition at line 25 of file http.h.
Referenced by TWebPg::IsTxt().
const TStr THttp::TextHtmlFldVal = "text/html" [static] |
const TStr THttp::TextJavaScriptFldVal = "text/javascript" [static] |
const TStr THttp::TextPlainFldVal = "text/plain" [static] |
const TStr THttp::TextWmlFldVal = "text/vnd.wap.wml" [static] |
const TStr THttp::TextXmlFldVal = "text/xml" [static] |
const TStr THttp::UndefMethodNm = "UndefinedMethod" [static] |