System::Net::Http::Headers::HttpHeaders class
Contents
[
Hide
]HttpHeaders class
The collection of the HTTP headers. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class HttpHeaders : public System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String, System::SharedPtr<System::Collections::Generic::IEnumerable<System::String>>>>
Methods
Method | Description |
---|---|
Add(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>) | Validates a new name-values pair and adds it to the current collection. |
Add(String, String) | Validates a new name-value pair and adds it to the current collection. |
virtual AddHeaders(System::SharedPtr<HttpHeaders>) | Concatenates the specified HttpHeaders-class instance with the current one. |
AddParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and adds a parsed value to the header. |
Clear() | Removes all items from the collection. |
Contains(String) | |
ContainsParsedValue(String, System::SharedPtr<Object>) | Checks if the header contains the specified value. |
GetEnumerator() override | Gets enumerator. |
GetHeaderString(String) | Returns a string representation of values by the specified header name. |
GetHeaderString(String, System::SharedPtr<Object>) | Returns a string representation of values by the specified header name. |
GetHeaderStrings() | Returns a collection that contains string representations of headers’ values. |
GetParsedValues(String) | Returns parsed values by the specified header name. |
GetValues(String) | Returns corresponding values by the specified name. |
static ParsedValuesAsList(const System::SharedPtr<Object>) | Converts parsed values to list. |
Remove(String) | Tries to remove an item by the specified name. |
RemoveParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and removes a parsed value from the header. |
SetConfiguration(System::SharedPtr<Collections::Generic::Dictionary<String, System::SharedPtr<HttpHeaderParser>>>, System::SharedPtr<Collections::Generic::HashSet<String>>) | |
SetOrRemoveParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and sets or removes its value. The header value will be removed when the ‘value’ parameter is nullptr, otherwise a parsed value will be set. |
SetParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and sets a parsed value to the header. |
ToString() const override | Analog of C# Object.ToString() method. Enables converting custom objects to string. |
TryAddWithoutValidation(String, String) | Tries to add a new name-value pair to the current collection. |
TryAddWithoutValidation(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>) | Adds a collection of name-value pairs to the current collection. |
TryGetValues(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>&) | Tries to get corresponding values by the specified name. |
TryParseAndAddValue(String, String) | Tries to parse the specified value and add it to the header values. |
See Also
- Class IEnumerable
- Namespace System::Net::Http::Headers
- Library Aspose.Page for C++