HTTP Client installs a standard string table, defining enumerations
in the HTTP namespace. It is used to define method names, header names,
session/transaction property names, parameter names for headers, and commonly
used MIME types (used for the Accept
and Content-Type
headers).
Strings in the string table are
constructed, copied and freed using RStringPool
. The main points to note are that:
Strings taken from the HTTP string table are accessed using
RStringPool::String()
or
RStringPool::StringF()
; they do not need to be
closed.
Strings not in the HTTP string table must be opened using
RStringPool::OpenStringL()
or
RStringPool::OpenFStringL()
and must be closed after
use.
Strings may be directly compared, whether
RString
or RStringF
. Comparison is
efficient and quick.
Strings are not freed from memory until all instances that were
Open()
ed have been Close()
d.
The HTTP string pool is automatically created when the first
session is started, and can be accessed via the handle returned by
RHTTPSession::StringPool()
.