HttpClientExt
Assembly: ServiceStack.Text.dll
View Source
Declaration
public static class HttpClientExt
Methods
MatchesContentType(HttpWebResponse, String)
Case-insensitive, trimmed compare of two content types from start to ';', i.e. without charset suffix
View Source
Declaration
public static bool MatchesContentType(this HttpWebResponse res, string matchesContentType)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Net.HttpWebResponse | res |
System.String | matchesContentType |
GetContentLength(HttpWebResponse)
Returns null for unknown Content-length Syntax + Behavior compatible with HttpClient HttpResponseMessage
View Source
Declaration
public static long? GetContentLength(this HttpWebResponse res)
Returns
System.Nullable<System.Int64>
Parameters
Type | Name |
---|---|
System.Net.HttpWebResponse | res |