SNAP Library 4.1, Developer Reference
2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <http.h>
Public Member Functions | |
THttpResp (const int &_StatusCd, const TStr &ContTypeVal, const bool &CacheCtrlP, const PSIn &BodySIn, const TStr LocStr) | |
THttpResp (const PSIn &SIn) | |
~THttpResp () | |
THttpResp (TSIn &) | |
void | Save (TSOut &) |
THttpResp & | operator= (const THttpResp &) |
bool | IsOk () const |
int | Len () const |
bool | IsContLenOk () const |
void | GetAsMem (TMem &Mem) const |
TStr | GetHdStr () const |
const TMem & | GetBodyAsMem () const |
TStr | GetBodyAsStr () const |
PSIn | GetBodyAsSIn () const |
int | GetStatusCd () const |
TStr | GetReasonPhrase () const |
int | GetFlds () const |
int | GetFldVals (const int &FldN) const |
void | GetFldNmVal (const int &FldN, TStr &FldNm, TStr &FldVal) |
void | GetFldNmVal (const int &FldN, const int &ValN, TStr &FldNm, TStr &FldVal) |
bool | IsFldNm (const TStr &FldNm) const |
TStr | GetFldVal (const TStr &FldNm, const int &ValN=0) const |
void | GetFldValV (const TStr &FldNm, TStrV &FldValV) const |
bool | IsFldVal (const TStr &FldNm, const TStr &FldVal) const |
void | AddFldVal (const TStr &FldNm, const TStr &FldVal) |
bool | IsStatusCd_Ok () const |
bool | IsStatusCd_Redir () const |
bool | IsContType () const |
bool | IsContType (const TStr &ContTypeStr) const |
bool | IsContLen (int &ContLen) const |
TStr | GetSrvNm () const |
void | GetCookieKeyValDmPathQuV (TStrQuV &CookieKeyValDmPathQuV) |
int | GetTxtLen () const |
void | SaveTxt (const PSOut &SOut) const |
void | SaveBody (const PSOut &SOut) const |
PSIn | GetSIn () const |
Static Public Member Functions | |
static PHttpResp | New (const int &StatusCd, const TStr &ContTypeVal, const bool &CacheCtrlP, const PSIn &BodySIn, const TStr LocStr=TStr()) |
static PHttpResp | New (const PSIn &SIn) |
static PHttpResp | Load (TSIn &) |
static PHttpResp | LoadTxt (PSIn &SIn) |
Private Member Functions | |
void | AddHdFld (const TStr &FldNm, const TStr &FldVal, TChA &HdChA) |
void | ParseHttpResp (const PSIn &SIn) |
Private Attributes | |
TCRef | CRef |
bool | Ok |
int | MajorVerN |
int | MinorVerN |
int | StatusCd |
TStr | ReasonPhrase |
TStrStrVH | FldNmToValVH |
TStr | HdStr |
TMem | BodyMem |
Friends | |
class | TPt< THttpResp > |
THttpResp::THttpResp | ( | const int & | _StatusCd, |
const TStr & | ContTypeVal, | ||
const bool & | CacheCtrlP, | ||
const PSIn & | BodySIn, | ||
const TStr | LocStr | ||
) |
Definition at line 740 of file http.cpp.
References AddHdFld(), BodyMem, TStr::Empty(), TPt< TRec >::Empty(), THttp::GetReasonPhrase(), TInt::GetStr(), HdStr, TSIn::Len(), TMem::LoadMem(), MajorVerN, MinorVerN, ReasonPhrase, and StatusCd.
THttpResp::THttpResp | ( | const PSIn & | SIn | ) |
Definition at line 777 of file http.cpp.
References Ok, and ParseHttpResp().
|
inline |
Definition at line 813 of file http.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), FldNmToValVH, THttpLx::GetNrStr(), HdStr, TStr::IsSuffix(), and TChA::Pop().
Definition at line 693 of file http.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), FldNmToValVH, and THttpLx::GetNrStr().
Referenced by THttpResp().
|
inline |
Definition at line 166 of file http.h.
References TMem::Clr().
|
inline |
Definition at line 170 of file http.h.
Referenced by TWebPg::IsTxt().
void THttpResp::GetCookieKeyValDmPathQuV | ( | TStrQuV & | CookieKeyValDmPathQuV | ) |
Definition at line 825 of file http.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), TStr::Empty(), GetFldValV(), TStr::GetTrunc(), TStr::IsChIn(), TVec< TVal, TSizeTy >::Len(), TStr::SplitOnAllCh(), and TStr::ToTrunc().
|
inline |
Definition at line 790 of file http.cpp.
References FldNmToValVH, THash< TKey, TDat, THashFunc >::GetDat(), THttpLx::GetNrStr(), THash< TKey, TDat, THashFunc >::IsKey(), and TVec< TVal, TSizeTy >::Len().
Referenced by IsFldVal().
Definition at line 800 of file http.cpp.
References TVec< TVal, TSizeTy >::Clr(), FldNmToValVH, THash< TKey, TDat, THashFunc >::GetDat(), THttpLx::GetNrStr(), and THash< TKey, TDat, THashFunc >::IsKey().
Referenced by GetCookieKeyValDmPathQuV().
|
inline |
Definition at line 173 of file http.h.
References THttp::GetReasonPhrase().
PSIn THttpResp::GetSIn | ( | ) | const |
Definition at line 860 of file http.cpp.
References BodyMem, HdStr, TMem::Len(), TStr::Len(), and TSOut::PutStr().
|
inline |
Definition at line 198 of file http.h.
References THttp::SrvFldNm.
|
inline |
Definition at line 196 of file http.h.
References THttp::ContLenFldNm.
|
inline |
Definition at line 192 of file http.h.
References THttp::ContTypeFldNm.
Referenced by TWebPg::IsTxt().
|
inline |
Definition at line 194 of file http.h.
References THttp::ContTypeFldNm.
bool THttpResp::IsFldNm | ( | const TStr & | FldNm | ) | const |
Definition at line 786 of file http.cpp.
References FldNmToValVH, THttpLx::GetNrStr(), and THash< TKey, TDat, THashFunc >::IsKey().
Definition at line 809 of file http.cpp.
References GetFldVal(), and THttpLx::GetNrStr().
|
inline |
|
inline |
Definition at line 203 of file http.h.
|
inlinestatic |
Definition at line 148 of file http.h.
Definition at line 153 of file http.h.
|
private |
Definition at line 699 of file http.cpp.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), BodyMem, TMem::Clr(), TStr::Clr(), THttpLx::ClrMemSf(), THttpLx::Eof(), FldNmToValVH, TMem::GetAsStr(), THttpLx::GetCrLf(), THttpLx::GetFldVal(), THttpLx::GetInt(), THttpLx::GetMemSf(), THttpLx::GetNrStr(), THttpLx::GetPeriod(), THttpLx::GetRespReasonPhrase(), THttpLx::GetRest(), THttpLx::GetSpec(), THttpLx::GetToken(), HdStr, THttpLx::IsCrLf(), THttpLx::IsRespStatusLn(), MajorVerN, MinorVerN, Ok, ReasonPhrase, and StatusCd.
Referenced by THttpResp().
|
inline |
|
inline |
Definition at line 207 of file http.h.
Referenced by TWebPg::SaveAsHttpBody().
|
inline |
Definition at line 205 of file http.h.
Referenced by TWebPg::SaveAsHttp().
|
private |
Definition at line 142 of file http.h.
Referenced by GetSIn(), ParseHttpResp(), and THttpResp().
|
private |
Definition at line 140 of file http.h.
Referenced by AddFldVal(), AddHdFld(), GetFldVal(), GetFldValV(), IsFldNm(), and ParseHttpResp().
|
private |
Definition at line 141 of file http.h.
Referenced by AddFldVal(), GetSIn(), ParseHttpResp(), and THttpResp().
|
private |
Definition at line 137 of file http.h.
Referenced by ParseHttpResp(), and THttpResp().
|
private |
Definition at line 137 of file http.h.
Referenced by ParseHttpResp(), and THttpResp().
|
private |
Definition at line 136 of file http.h.
Referenced by ParseHttpResp(), and THttpResp().
|
private |
Definition at line 139 of file http.h.
Referenced by ParseHttpResp(), and THttpResp().
|
private |
Definition at line 138 of file http.h.
Referenced by ParseHttpResp(), and THttpResp().