HttpRequestHeaderCollection Class
Represents a collection of the HTTP request headers
Inheritance
System.Object
System.Collections.Generic.Dictionary<System.String, System.String>
HttpRequestHeaderCollection
Implements
System.Collections.Generic.IDictionary<System.String, System.String>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>
System.Collections.IDictionary
System.Collections.ICollection
System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>
System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>
System.Collections.IEnumerable
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
Inherited Members
System.Collections.Generic.Dictionary<System.String, System.String>.Add(System.String, System.String)
System.Collections.Generic.Dictionary<System.String, System.String>.Clear()
System.Collections.Generic.Dictionary<System.String, System.String>.Comparer
System.Collections.Generic.Dictionary<System.String, System.String>.ContainsKey(System.String)
System.Collections.Generic.Dictionary<System.String, System.String>.ContainsValue(System.String)
System.Collections.Generic.Dictionary<System.String, System.String>.Count
System.Collections.Generic.Dictionary<System.String, System.String>.GetEnumerator()
System.Collections.Generic.Dictionary<System.String, System.String>.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Collections.Generic.Dictionary<System.String, System.String>.Item[System.String]
System.Collections.Generic.Dictionary<System.String, System.String>.Keys
System.Collections.Generic.Dictionary<System.String, System.String>.OnDeserialization(System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.Remove(System.String)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Add(System.Collections.Generic.KeyValuePair<System.String, System.String>)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Contains(System.Collections.Generic.KeyValuePair<System.String, System.String>)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.CopyTo(System.Collections.Generic.KeyValuePair<System.String, System.String>[], System.Int32)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.IsReadOnly
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.String>>.Remove(System.Collections.Generic.KeyValuePair<System.String, System.String>)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IDictionary<System.String, System.String>.Keys
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IDictionary<System.String, System.String>.Values
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.String>>.GetEnumerator()
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>.Keys
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.Generic.IReadOnlyDictionary<System.String, System.String>.Values
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Add(System.Object, System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Contains(System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.get_Item(System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.GetEnumerator()
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.IsFixedSize
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.IsReadOnly
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Item[System.Object]
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Keys
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Remove(System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.set_Item(System.Object, System.Object)
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IDictionary.Values
System.Collections.Generic.Dictionary<System.String, System.String>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.Dictionary<System.String, System.String>.TryGetValue(System.String, System.String)
System.Collections.Generic.Dictionary<System.String, System.String>.Values
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.HtmlConverter
Assembly: Syncfusion.HtmlConverter.Base.dll
Syntax
public class HttpRequestHeaderCollection : Dictionary<string, string>, IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IDictionary, ICollection, IReadOnlyDictionary<string, string>, IReadOnlyCollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IEnumerable, ISerializable, IDeserializationCallback
Remarks
To know more details about HTTP request headers, refer this link.
Examples
//Initialize HTML converter
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
//Initialize WebKit converter settings
WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
//Assign the WebKit path
webKitSettings.WebKitPath = @"/QtBinaries/";
//Initialize HTTP header collection and add the name and value.
HttpRequestHeaderCollection httpRequestHeaderCollection = new HttpRequestHeaderCollection();
httpRequestHeaderCollection.Add("headername", "headervalue");
//Assign the HTTP header collection to the webkit settings.
webKitSettings.HttpRequestHeaders = httpRequestHeaderCollection;
//Assign the WebKit settings
htmlConverter.ConverterSettings = webKitSettings;
//Convert url to pdf
PdfDocument document = htmlConverter.Convert("https://www.google.com");
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Initialize HTML converter
Dim htmlConverter As New HtmlToPdfConverter(HtmlRenderingEngine.WebKit)
'Initialize WebKit converter settings
Dim webKitSettings As New WebKitConverterSettings()
'Assign the WebKit path
webKitSettings.WebKitPath = "/QtBinaries/"
'Initialize HTTP header collection and add the name and value.
Dim httpRequestHeaderCollection As New HttpRequestHeaderCollection()
httpRequestHeaderCollection.Add("headername", "headervalue")
'Assign the HTTP header collection to the webkit settings.
webKitSettings.HttpRequestHeaders = httpRequestHeaderCollection
'Assign the WebKit settings
htmlConverter.ConverterSettings = webKitSettings
'Convert url to pdf
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Constructors
HttpRequestHeaderCollection()
Declaration
public HttpRequestHeaderCollection()
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.IDictionary
System.Collections.ICollection
System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback