72 while ((
curr < next) && (buf[
curr] !=
':'))
75 while ((
curr < next) && (buf[
curr] ==
' '))
354 AddHeader(
"Cache-Control",
"private, no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, s-maxage=0");
367 hdr.append(
" 404 Not Found\r\n"
368 "Content-Length: 0\r\n"
369 "Connection: close\r\n\r\n");
372 "Content-Type: %s\r\n"
373 "Connection: keep-alive\r\n"
374 "Content-Length: %ld\r\n"
399 buffer.resize(buflen);
401 char *
bufcur = (
char *)buffer.data();
438 buffer.resize(
bufcur - (
char *)buffer.data());
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h length
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Contains arguments for single HTTP call.
std::string fPostData
! data received with post request - text - or binary
Bool_t fNotifyFlag
! indicate that notification called
Bool_t CompressWithGzip()
Compress reply data with gzip compression.
void SetJson()
Set content type as "application/json".
TString GetHeader(const char *name)
Return specified header.
std::condition_variable fCond
! condition used to wait for processing
void SetPostData(void *data, Long_t length, Bool_t make_copy=kFALSE)
Set data, posted with the request.
std::shared_ptr< THttpWSEngine > TakeWSEngine()
Takeout websocket handle with HTTP call.
void AddHeader(const char *name, const char *value)
Set name: value pair to reply header.
void SetText()
Set content type as "text/plain".
void SetTextContent(std::string &&txt)
Set content type as "text/plain" and also assigns content.
virtual void HttpReplied()
virtual method to inform object that http request is processed
void ReplaceAllinContent(const std::string &from, const std::string &to, bool once=false)
Replace all occurrences of string in content.
TString fPathName
! item path
std::shared_ptr< THttpWSEngine > fWSEngine
! web-socket engine, which supplied to run created web socket
void NotifyCondition()
Method used to notify condition which waiting when operation will complete.
void SetPathAndFileName(const char *fullpath)
Set complete path of requested http element.
TString fContentType
! type of content
Long_t GetContentLength() const
virtual ~THttpCallArg()
destructor
TString CountHeader(const TString &buf, Int_t number=-1111) const
method used to counter number of headers or returns name of specified header
const void * GetContent() const
void SetBinary()
Set content type as "application/x-binary".
void AddNoCacheHeader()
Set CacheControl http header to disable browser caching.
TString AccessHeader(TString &buf, const char *name, const char *value=nullptr, Bool_t doing_set=kFALSE)
method used to get or set http header in the string buffer
void SetXml()
Set content type as "text/xml".
void SetContent(const char *cont)
Set content as text.
Bool_t IsPostponed() const
void SetWSId(UInt_t id)
set web-socket id
TString fFileName
! file name
std::string fContent
! content - text or binary
void SetBinaryContent(std::string &&bin)
Set content type as "application/x-binary" and also assigns content.
void SetContentType(const char *typ)
set content type like "text/xml" or "application/json"
void SetEncoding(const char *typ)
Set Content-Encoding header like gzip.
void SetJsonContent(std::string &&json)
Set content type as "application/json" and also assigns content.
const char * GetContentType() const
void AssignWSId()
Assign websocket identifier from the engine.
void SetXmlContent(std::string &&xml)
Set content type as "text/xml" and also assigns content.
std::string FillHttpHeader(const char *header=nullptr)
Fills HTTP header, which can be send at the beginning of reply on the http request.
TString fHeader
! response header like ContentEncoding, Cache-Control and so on
TString & Insert(Ssiz_t pos, const char *s)
void Clear()
Clear string without changing its capacity.
const char * Data() const
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const