SNAP Library 2.2, Developer Reference  2014-03-11 19:15:55
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
THttp Class Reference

#include <http.h>

Collaboration diagram for THttp:

List of all members.

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"

Detailed Description

Definition at line 5 of file http.h.


Member Function Documentation

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);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

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());
}

Here is the call graph for this function:

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()));
}

Here is the call graph for this function:


Member Data Documentation

const TStr THttp::AcceptFldNm = "Accept" [static]

Definition at line 17 of file http.h.

const TStr THttp::AcceptRangesFldNm = "Accept-Ranges" [static]

Definition at line 15 of file http.h.

const TStr THttp::AppJSonFldVal = "application/json" [static]

Definition at line 39 of file http.h.

const TStr THttp::AppOctetFldVal = "application/octet-stream" [static]

Definition at line 36 of file http.h.

const TStr THttp::AppSoapXmlFldVal = "application/soap+xml" [static]

Definition at line 37 of file http.h.

const TStr THttp::AppW3FormFldVal = "application/x-www-form-urlencoded" [static]

Definition at line 38 of file http.h.

const int THttp::BadRqStatusCd = 400 [static]

Definition at line 50 of file http.h.

const TStr THttp::CacheCtrlFldNm = "Cache-Control" [static]

Definition at line 16 of file http.h.

const TStr THttp::ColonStr = ":" [static]

Definition at line 10 of file http.h.

const TStr THttp::ConnFldNm = "Connection" [static]

Definition at line 19 of file http.h.

const TStr THttp::ConnKeepAliveFldVal = "keep-alive" [static]

Definition at line 40 of file http.h.

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]

Definition at line 23 of file http.h.

const int THttp::DfPortN = 80 [static]

Definition at line 46 of file http.h.

Referenced by TUrl::GetAbs().

const int THttp::ErrNotFoundStatusCd = 404 [static]

Definition at line 52 of file http.h.

const int THttp::ErrStatusCd = 400 [static]

Definition at line 51 of file http.h.

const TStr THttp::FetchIdFldNm = "FetchId" [static]

Definition at line 20 of file http.h.

const TStr THttp::GetMethodNm = "GET" [static]

Definition at line 56 of file http.h.

const TStr THttp::HeadMethodNm = "HEAD" [static]

Definition at line 57 of file http.h.

const TStr THttp::HostFldNm = "Host" [static]

Definition at line 14 of file http.h.

const TStr THttp::HttpStr = "http" [static]

Definition at line 8 of file http.h.

const TStr THttp::ImageGifFldVal = "image/gif" [static]

Definition at line 34 of file http.h.

const TStr THttp::ImageIcoFldVal = "image/x-icon" [static]

Definition at line 32 of file http.h.

const TStr THttp::ImageJpgFldVal = "image/jpg" [static]

Definition at line 35 of file http.h.

const TStr THttp::ImagePngFldVal = "image/png" [static]

Definition at line 33 of file http.h.

const int THttp::InternalErrStatusCd = 500 [static]

Definition at line 53 of file http.h.

const TStr THttp::LocFldNm = "Location" [static]

Definition at line 21 of file http.h.

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]

Definition at line 58 of file http.h.

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]

Definition at line 22 of file http.h.

const TStr THttp::SlashStr = "/" [static]

Definition at line 9 of file http.h.

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]

Definition at line 31 of file http.h.

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]

Definition at line 27 of file http.h.

const TStr THttp::TextJavaScriptFldVal = "text/javascript" [static]

Definition at line 30 of file http.h.

const TStr THttp::TextPlainFldVal = "text/plain" [static]

Definition at line 26 of file http.h.

const TStr THttp::TextWmlFldVal = "text/vnd.wap.wml" [static]

Definition at line 29 of file http.h.

const TStr THttp::TextXmlFldVal = "text/xml" [static]

Definition at line 28 of file http.h.

const TStr THttp::UndefMethodNm = "UndefinedMethod" [static]

Definition at line 59 of file http.h.


The documentation for this class was generated from the following files: