HttpRequestHeaders
Contents
[
Hide
]HttpRequestHeaders class
Represents the collection of the ‘Request’ 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 HttpRequestHeaders : public System::Net::Http::Headers::HttpHeaders
Methods
Method | Description |
---|---|
void Add(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>) | Validates a new name-values pair and adds it to the current collection. |
void Add(String, String) | Validates a new name-value pair and adds it to the current collection. |
void AddHeaders(System::SharedPtr<HttpHeaders>) override | Concatenates the specified HttpHeaders-class instance with the current one. |
static void AddKnownHeaders(System::SharedPtr<Collections::Generic::HashSet<String>>) | Adds the known headers to the specified collection. |
void AddParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and adds a parsed value to the header. |
iterator begin() | Gets iterator pointing to the first element (if any) of the collection. This iterator can’t be used to change a referenced object because GetEnumerator() returns a copy-object of T. |
const_iterator begin() const | Gets iterator pointing to the first element (if any) of the const-qualified instance of the collection. |
const_iterator cbegin() const | Gets iterator pointing to the first const-qualified element (if any) of the collection. |
const_iterator cend() const | Gets iterator pointing right after the last const-qualified element (if any) of the collection. |
void Clear() | Removes all items from the collection. |
bool Contains(String) | |
bool ContainsParsedValue(String, System::SharedPtr<Object>) | Checks if the header contains the specified value. |
iterator end() | Gets iterator pointing right after the last element (if any) of the collection. This iterator can’t be used to change a referenced object because GetEnumerator() returns a copy-object of T. |
const_iterator end() const | Gets iterator pointing right after the last element (if any) of the const-qualified instance of the collection. |
virtual bool Equals(ptr) | Compares objects using C# Object.Equals semantics. |
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares reference type objects in C# style. |
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares value type objects in C# style. |
static bool Equals(float const&, float const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static bool Equals(double const&, double const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
virtual bool FastCast(const Details::FastRttiBase&, void **) const | For internal purposes only. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<MediaTypeWithQualityHeaderValue>>> get_Accept() | Returns a value of the ‘Accept’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<StringWithQualityHeaderValue>>> get_AcceptCharset() | Returns a value of the ‘Accept-Charset’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<StringWithQualityHeaderValue>>> get_AcceptEncoding() | Returns a value of the ‘Accept-Encoding’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<StringWithQualityHeaderValue>>> get_AcceptLanguage() | Returns a value of the ‘Accept-Language’ header. |
System::SharedPtr<AuthenticationHeaderValue> get_Authorization() | Gets a value of the ‘Authorization’ header. |
System::SharedPtr<CacheControlHeaderValue> get_CacheControl() | Gets a value of the ‘Cache-Control’ header. |
System::SharedPtr<HttpHeaderValueCollection<String>> get_Connection() | Returns a value of the ‘Connection’ header. |
Nullable<bool> get_ConnectionClose() | Gets a value that indicates if the ‘Connection’ header value contains ‘Close’. |
Nullable<DateTimeOffset> get_Date() | Gets a value of the ‘Date’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<NameValueWithParametersHeaderValue>>> get_Expect() | Returns value of the ‘Expect’ header. |
Nullable<bool> get_ExpectContinue() | Gets a value that indicates if the ‘Expect’ header value contains ‘Continue’. |
String get_From() | Gets a value of the ‘From’ header. |
String get_Host() | Gets a value of the ‘Host’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<EntityTagHeaderValue>>> get_IfMatch() | Returns a value of the ‘If-Match’ header. |
Nullable<DateTimeOffset> get_IfModifiedSince() | Gets a value of the ‘If-Modified-Since’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<EntityTagHeaderValue>>> get_IfNoneMatch() | Returns a value of the ‘If-None-Match’ header. |
System::SharedPtr<RangeConditionHeaderValue> get_IfRange() | Gets a value of the ‘If-Range’ header. |
Nullable<DateTimeOffset> get_IfUnmodifiedSince() | Gets a value of the ‘If-Unmodified-Since’ header. |
Nullable<int32_t> get_MaxForwards() | Gets a value of the ‘Max-Forwards’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<NameValueHeaderValue>>> get_Pragma() | Returns a value of the ‘Pragma’ header. |
System::SharedPtr<AuthenticationHeaderValue> get_ProxyAuthorization() | Gets a value of the ‘Proxy-Authorization’ header. |
System::SharedPtr<RangeHeaderValue> get_Range() | Gets a value of the ‘Range’ header. |
System::SharedPtr<Uri> get_Referrer() | Gets a value of the ‘Referer’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<TransferCodingWithQualityHeaderValue>>> get_TE() | Returns a value of the ‘TE’ header. |
System::SharedPtr<HttpHeaderValueCollection<String>> get_Trailer() | Returns a value of the ‘Trailer’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<TransferCodingHeaderValue>>> get_TransferEncoding() | Returns a value of the ‘Transfer-Encoding’ header. |
Nullable<bool> get_TransferEncodingChunked() | Gets a value that indicates if the ‘Transfer-Encoding’ header value contains ‘Chunked’. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<ProductHeaderValue>>> get_Upgrade() | Returns a value of the ‘Upgrade’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<ProductInfoHeaderValue>>> get_UserAgent() | Returns a value of the ‘User-Agent’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<ViaHeaderValue>>> get_Via() | Returns a value of the ‘Via’ header. |
System::SharedPtr<HttpHeaderValueCollection<System::SharedPtr<WarningHeaderValue>>> get_Warning() | Returns a value of the ‘Warning’ header. |
Detail::SmartPtrCounter * GetCounter() | Gets reference counter data structure associated with the object. |
System::SharedPtr<Collections::Generic::IEnumerator<Collections::Generic::KeyValuePair<String, System::SharedPtr<Collections::Generic::IEnumerable<String>>>>> GetEnumerator() override | Gets enumerator. |
virtual int32_t GetHashCode() const | Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. |
String GetHeaderString(String) | Returns a string representation of values by the specified header name. |
String GetHeaderString(String, System::SharedPtr<Object>) | Returns a string representation of values by the specified header name. |
System::SharedPtr<Collections::Generic::IEnumerable<Collections::Generic::KeyValuePair<String, String>>> GetHeaderStrings() | Returns a collection that contains string representations of headers’ values. |
System::SharedPtr<Object> GetParsedValues(String) | Returns parsed values by the specified header name. |
virtual const TypeInfo& GetType() const | Gets actual type of object. Analog of C# System.Object.GetType() call. |
System::SharedPtr<Collections::Generic::IEnumerable<String>> GetValues(String) | Returns corresponding values by the specified name. |
HttpRequestHeaders() | Constructs a new instance. |
virtual bool Is(const TypeInfo&) const | Check if object represents an instance of type described by targetType. Analog of C# ‘is’ operator. |
bool LINQ_All(std::function<bool(T)>) | Determines whether all elements of a sequence satisfy a condition. |
bool LINQ_Any() | Determines whether a sequence contains any elements. |
bool LINQ_Any(std::function<bool(T)>) | Determines whether any element of a sequence exists or satisfies a condition. |
SharedPtr<IEnumerable<ResultType>> LINQ_Cast() | Casts the elements to the specified type. |
SharedPtr<IEnumerable<Result>> LINQ_Cast() | |
SharedPtr<IEnumerable<T>> LINQ_Concat(SharedPtr<IEnumerable<T>>) | Concatenates two sequences. |
bool LINQ_Contains(T) | Determines if a sequence contains a specified value. |
int LINQ_Count() | Returns the number of elements in the sequence (calculated via direct counting). |
int LINQ_Count(const Func<T, bool>&) | Returns the number of elements in the sequence that satisfy the specified condition. |
T LINQ_ElementAt(int) | Returns the element at a specified index in a sequence. |
T LINQ_First() | Returns the first element of a sequence. |
T LINQ_First(const Func<T, bool>&) | Returns the first element of a sequence that satisfy the specified condition. |
T LINQ_FirstOrDefault() | Returns the first element of a sequence, or a default value if the sequence is empty. |
T LINQ_FirstOrDefault(std::function<bool(T)>) | Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. |
System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, T>>>> LINQ_GroupBy(System::Func<T, Key>) | Groups the elements of a sequence. |
SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Source>>>> LINQ_GroupBy(System::Func<Source, Key>) | |
T LINQ_Last() | Returns the last element of a sequence. |
T LINQ_LastOrDefault() | Returns the last element of a sequence, or a default value if the sequence is empty. |
SharedPtr<IEnumerable<ResultType>> LINQ_OfType() | Filters the elements of the sequence based on the specified type. |
SharedPtr<IEnumerable<Result>> LINQ_OfType() | |
SharedPtr<IEnumerable<T>> LINQ_OrderBy(const Func<T, Key>&) | Sorts the elements of a sequence in ascending order according to the key values selected by keySelector. |
SharedPtr<IEnumerable<Source>> LINQ_OrderBy(const Func<Source, Key>&) | |
SharedPtr<IEnumerable<T>> LINQ_OrderByDescending(const Func<T, Key>&) | Sorts the elements of a sequence in descending order according to the key values selected by keySelector. |
SharedPtr<IEnumerable<Source>> LINQ_OrderByDescending(const Func<Source, Key>&) | |
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, ResultType>&) | Transforms elements of a sequence. |
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, int32_t, ResultType>&) | Transforms each element of a sequence into a new form by incorporating the element’s index. |
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, Result>&) | |
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, int32_t, Result>&) | |
SharedPtr<IEnumerable<ResultType>> LINQ_SelectMany(const Func<T, SharedPtr<IEnumerable<ResultType>>>&) | Projects each element of a sequence and combines the resulting sequences into one sequence. |
SharedPtr<IEnumerable<Result>> LINQ_SelectMany(const Func<Source, SharedPtr<IEnumerable<Result>>>&) | |
System::ArrayPtr<T> LINQ_ToArray() | Creates an array from a sequence. |
SharedPtr<List<T>> LINQ_ToList() | Creates a List |
SharedPtr<IEnumerable<T>> LINQ_Where(std::function<bool(T)>) | Filters a sequence based on the specified predicate. |
void Lock() | Implements C# lock() statement locking. Call directly or use LockContext sentry object. |
virtual ptr MemberwiseClone() const | Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. |
Object() | Creates object. Initializes all internal data structures. |
Object(Object const&) | Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
Object& operator=(Object const&) | Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
static System::SharedPtr<System::Collections::Generic::List<System::SharedPtr<System::Object>>> ParsedValuesAsList(const System::SharedPtr<Object>) | Converts parsed values to list. |
static bool ReferenceEquals(ptr const&, ptr const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t) | Reference-compares value type object with nullptr. |
bool ReferenceEquals(String const&, std::nullptr_t) | Specialization of Object::ReferenceEquals for case of string and nullptr. |
bool ReferenceEquals(String const&, String const&) | Specialization of Object::ReferenceEquals for case of strings. |
bool Remove(String) | Tries to remove an item by the specified name. |
int RemovedSharedRefs(int) | Decreases shared reference count by specified value. |
bool RemoveParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and removes a parsed value from the header. |
void set_Authorization(System::SharedPtr<AuthenticationHeaderValue>) | Sets a value of the ‘Authorization’ header. |
void set_CacheControl(System::SharedPtr<CacheControlHeaderValue>) | Sets a value of the ‘Cache-Control’ header. |
void set_ConnectionClose(Nullable<bool>) | Sets a value that indicates if the ‘Connection’ header value contains ‘Close’. |
void set_Date(Nullable<DateTimeOffset>) | Sets a value of the ‘Date’ header. |
void set_ExpectContinue(Nullable<bool>) | Sets a value that indicates if the ‘Expect’ header value contains ‘Continue’. |
void set_From(String) | Sets a value of the ‘From’ header. |
void set_Host(String) | Sets a value of the ‘Host’ header. |
void set_IfModifiedSince(Nullable<DateTimeOffset>) | Sets a value of the ‘If-Modified-Since’ header. |
void set_IfRange(System::SharedPtr<RangeConditionHeaderValue>) | Sets a value of the ‘If-Range’ header. |
void set_IfUnmodifiedSince(Nullable<DateTimeOffset>) | Sets a value of the ‘If-Unmodified-Since’ header. |
void set_MaxForwards(Nullable<int32_t>) | Sets a value of the ‘Max-Forwards’ header. |
void set_ProxyAuthorization(System::SharedPtr<AuthenticationHeaderValue>) | Sets a value of the ‘Proxy-Authorization’ header. |
void set_Range(System::SharedPtr<RangeHeaderValue>) | Sets a value of the ‘Range’ header. |
void set_Referrer(System::SharedPtr<Uri>) | Sets a value of the ‘Referer’ header. |
void set_TransferEncodingChunked(Nullable<bool>) | Sets a value that indicates if the ‘Transfer-Encoding’ header value contains ‘Chunked’. |
void SetConfiguration(System::SharedPtr<Collections::Generic::Dictionary<String, System::SharedPtr<HttpHeaderParser>>>, System::SharedPtr<Collections::Generic::HashSet<String>>) | |
void 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. |
void SetParsedValue(String, System::SharedPtr<Object>) | Gets a header by the specified name and sets a parsed value to the header. |
virtual void SetTemplateWeakPtr(uint32_t) | Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. |
int SharedCount() const | Gets current value of shared reference counter. |
Object * SharedRefAdded() | Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
int SharedRefRemovedSafe() | Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
String ToString() const override | Analog of C# Object.ToString() method. Enables converting custom objects to string. |
bool TryAddWithoutValidation(String, String) | Tries to add a new name-value pair to the current collection. |
bool TryAddWithoutValidation(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>) | Adds a collection of name-value pairs to the current collection. |
bool TryGetValues(String, System::SharedPtr<Collections::Generic::IEnumerable<String>>&) | Tries to get corresponding values by the specified name. |
bool TryParseAndAddValue(String, String) | Tries to parse the specified value and add it to the header values. |
static const TypeInfo& Type() | Implements C# typeof(System.Object) construct. |
void Unlock() | Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. |
virtual virtualized_iterator * virtualizeBeginConstIterator() const | Gets the implementation of begin const iterator for the current container. |
virtual virtualized_iterator * virtualizeBeginIterator() | Gets the implementation of begin iterator for the current container. |
virtual virtualized_iterator * virtualizeEndConstIterator() const | Gets the implementation of end const iterator for the current container. |
virtual virtualized_iterator * virtualizeEndIterator() | Gets the implementation of end iterator for the current container. |
Detail::SmartPtrCounter * WeakRefAdded() | Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
void WeakRefRemoved() | Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
virtual ~Object() | Destroys object. Frees all internal data structures. |
See Also
- Class HttpHeaders
- Namespace System::Net::Http::Headers
- Library Aspose.Slides