Reputation: 85
I'm using the component in delphi indy idhttp 2010 and I have the following problem, I'm trying to get all the values of rawheaders idHTTP1.Request.RawHeaders.Values ['User-Agent']
, the only one I know of is user agent and I wonder where I can find the list of values to use in RawHeaders.Values.
Does anyone could help me?
Upvotes: 0
Views: 1783
Reputation: 16045
Your question can be read in few ways.
You ask about "to get all the values of rawheaders" - that is "read, not modify". And then you tell about "values to use in RawHeaders.Values" - which is "write, not read".
Actually it is hard to guess what did you meant here.
idHTTP1.Request
: http://www.indyproject.org/docsite/html/TIdEntityHeaderInfo.html property RawHeaders: TIdHeaderList;
- come to http://www.indyproject.org/docsite/html/TIdHeaderList.html TStringList
thus you can read it with all the usual TStrings-related methods.Like
idHTTP1.Request.RawHeaders.SaveToFile('1.txt');
s := idHTTP1.Request.RawHeaders.CommaText;
with idHTTP1.Request.RawHeaders do for i := 0 to Count - 1 do begin s := Strings[i]; ... end;
for s in idHTTP1.Request.RawHeaders do begin ... end;
etc.
idHTTP1.Request
: http://www.indyproject.org/docsite/html/TIdEntityHeaderInfo.html content-disposition
. Some of them are probably retroactively described by communities like HTML5 working group. Or maybe not,Upvotes: 1