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 | |
THttpRq (const PSIn &SIn) | |
THttpRq (const THttpRqMethod &_Method, const PUrl &_Url, const TStr &ContTypeFldVal, const TMem &_BodyMem, const int &FetchId=-1) | |
~THttpRq () | |
THttpRq (TSIn &) | |
void | Save (TSOut &) |
THttpRq & | operator= (const THttpRq &) |
bool | IsOk () const |
bool | IsComplete () const |
THttpRqMethod | GetMethod () const |
const TStr & | GetMethodNm () const |
PUrl | GetUrl () const |
PUrlEnv | GetUrlEnv () const |
bool | IsFldNm (const TStr &FldNm) const |
TStr | GetFldVal (const TStr &FldNm) const |
bool | IsFldVal (const TStr &FldNm, const TStr &FldVal) const |
void | AddFldVal (const TStr &FldNm, const TStr &FldVal) |
const TStrStrH & | GetFldValH () const |
TStr | GetHdStr () const |
bool | IsBody () const |
int | GetBodyLen () const |
TStr | GetBodyAsStr () const |
PSIn | GetBodyAsSIn () const |
void | GetBodyAsMem (TMem &Mem) const |
void | GetAsMem (TMem &Mem) const |
bool | IsContType (const TStr &ContTypeStr) const |
bool | IsContLen (int &ContLen) const |
TStr | GetStr () const |
Static Public Member Functions | |
static PHttpRq | New (const PSIn &SIn) |
static PHttpRq | New (const THttpRqMethod &Method, const PUrl &Url, const TStr &ContTypeFldVal, const TMem &BodyMem) |
static PHttpRq | New (const PUrl &Url, const int &FetchId=-1) |
static PHttpRq | Load (TSIn &) |
Private Member Functions | |
void | ParseSearch (const TStr &SearchStr) |
void | ParseHttpRq (const PSIn &SIn) |
Private Attributes | |
TCRef | CRef |
bool | Ok |
bool | CompleteP |
int | MajorVerN |
int | MinorVerN |
THttpRqMethod | Method |
PUrl | Url |
TStrStrH | FldNmToValH |
PUrlEnv | UrlEnv |
TStr | HdStr |
TMem | BodyMem |
Friends | |
class | TPt< THttpRq > |
THttpRq::THttpRq | ( | const PSIn & | SIn | ) |
Definition at line 581 of file http.cpp.
References Ok, and ParseHttpRq().
THttpRq::THttpRq | ( | const THttpRqMethod & | _Method, |
const PUrl & | _Url, | ||
const TStr & | ContTypeFldVal, | ||
const TMem & | _BodyMem, | ||
const int & | FetchId = -1 |
||
) |
Definition at line 591 of file http.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), TStr::Empty(), FldNmToValH, TUrl::GetHostNm(), GetMethodNm(), THttpLx::GetNrStr(), TUrl::GetPathStr(), TUrl::GetSearchStr(), TInt::GetStr(), HdStr, TUrl::IsOk(), Ok, ParseSearch(), and Url.
|
inline |
Definition at line 664 of file http.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), FldNmToValH, and THttpLx::GetNrStr().
|
inline |
Definition at line 120 of file http.h.
References TMem::Clr().
|
inline |
Definition at line 119 of file http.h.
References TMem::Clr().
|
inline |
Definition at line 118 of file http.h.
References TMemIn::New().
|
inline |
Definition at line 650 of file http.cpp.
References FldNmToValH, THash< TKey, TDat, THashFunc >::GetDat(), THttpLx::GetNrStr(), and THash< TKey, TDat, THashFunc >::IsKey().
Referenced by IsFldVal(), and ParseHttpRq().
const TStrStrH & THttpRq::GetFldValH | ( | ) | const |
Definition at line 669 of file http.cpp.
References FldNmToValH.
|
inline |
const TStr & THttpRq::GetMethodNm | ( | ) | const |
Definition at line 637 of file http.cpp.
References THttp::GetMethodNm, THttp::HeadMethodNm, hrmGet, hrmHead, hrmPost, Method, THttp::PostMethodNm, and THttp::UndefMethodNm.
Referenced by GetStr(), and THttpRq().
TStr THttpRq::GetStr | ( | ) | const |
Definition at line 673 of file http.cpp.
References BodyMem, THttp::ContLenFldNm, TMem::Empty(), FldNmToValH, TMem::GetAsStr(), THash< TKey, TDat, THashFunc >::GetKey(), GetMethodNm(), TInt::GetStr(), TUrl::GetUrlStr(), TMem::Len(), THash< TKey, TDat, THashFunc >::Len(), and Url.
|
inline |
Definition at line 125 of file http.h.
References THttp::ContLenFldNm.
|
inline |
bool THttpRq::IsFldNm | ( | const TStr & | FldNm | ) | const |
Definition at line 646 of file http.cpp.
References FldNmToValH, THttpLx::GetNrStr(), and THash< TKey, TDat, THashFunc >::IsKey().
Referenced by ParseHttpRq().
Definition at line 659 of file http.cpp.
References GetFldVal(), and THttpLx::GetNrStr().
|
inlinestatic |
|
private |
Definition at line 513 of file http.cpp.
References THash< TKey, TDat, THashFunc >::AddDat(), BodyMem, THttpLx::ClrMemSf(), CompleteP, THttpLx::Eof(), FldNmToValH, TMem::GetAsStr(), THttpLx::GetCrLf(), GetFldVal(), THttpLx::GetFldVal(), THttpLx::GetInt(), TStr::GetInt(), THttpLx::GetMemSf(), THttpLx::GetNrStr(), THttpLx::GetPeriod(), THttpLx::GetRest(), THttpLx::GetRqMethod(), TUrl::GetSearchStr(), THttpLx::GetSpec(), THttpLx::GetToken(), THttpLx::GetUrlStr(), THttpLx::GetWs(), HdStr, heBadUrl, hrmGet, hrmPost, THttpLx::IsCrLf(), IsFldNm(), TUrl::IsOk(), TMem::Len(), MajorVerN, Method, MinorVerN, TUrl::New(), Ok, ParseSearch(), TMem::Trunc(), and Url.
Referenced by THttpRq().
|
private |
Definition at line 462 of file http.cpp.
References TChA::AddCh(), TUrlEnv::AddToKeyVal(), TChA::Clr(), THttpChRet::Eof(), THttpChRet::GetCh(), TCh::GetHex(), heBadSearchStr, TCh::IsHex(), TStrIn::New(), Ok, and UrlEnv.
Referenced by ParseHttpRq(), and THttpRq().
|
inline |
|
private |
Definition at line 77 of file http.h.
Referenced by GetStr(), and ParseHttpRq().
|
private |
Definition at line 70 of file http.h.
Referenced by ParseHttpRq().
|
private |
Definition at line 74 of file http.h.
Referenced by AddFldVal(), GetFldVal(), GetFldValH(), GetStr(), IsFldNm(), ParseHttpRq(), and THttpRq().
|
private |
Definition at line 76 of file http.h.
Referenced by ParseHttpRq(), and THttpRq().
|
private |
Definition at line 71 of file http.h.
Referenced by ParseHttpRq().
|
private |
Definition at line 72 of file http.h.
Referenced by GetMethodNm(), and ParseHttpRq().
|
private |
Definition at line 71 of file http.h.
Referenced by ParseHttpRq().
|
private |
Definition at line 69 of file http.h.
Referenced by ParseHttpRq(), ParseSearch(), and THttpRq().
|
private |
Definition at line 73 of file http.h.
Referenced by GetStr(), ParseHttpRq(), and THttpRq().
|
private |
Definition at line 75 of file http.h.
Referenced by ParseSearch().