HttpResponse
Overview
Response class for HTTP requests. This holds the response received from the server.
Location
-
Reference:
- Elements.dll .NET, .NET Core 6.0, .NET Standard 2.0
- elements.jar Cooper
- Elements.fx Island, ToffeeV2
- libElements.fx Toffee
- Namespace: RemObjects.Elements.RTL
- Platforms: .NET, .NET Core 6.0, .NET Standard 2.0, Cooper, Island, Toffee, ToffeeV2
Code
Http code.
property Code: Int32 read;
Int32 Code { get; }
var Code: Int32 { get{} }
Integer Code { __get; }
ReadOnly Property Code() As Int32
ContentEncoding
property ContentEncoding: nullable String read;
String? ContentEncoding { get; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var ContentEncoding: String? { get{} }
// Toffee
var ContentEncoding: String { get{} }
String ContentEncoding { __get; }
ReadOnly Property ContentEncoding() As String?
ContentType
property ContentType: nullable String read;
String? ContentType { get; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var ContentType: String? { get{} }
// Toffee
var ContentType: String { get{} }
String ContentType { __get; }
ReadOnly Property ContentType() As String?
Dispose .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
Dispose this class and resources attached to it.
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
Exception
Exception retrieving this request.
property Exception: nullable Exception read write;
Exception? Exception { get; set; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var Exception: Exception? { get{} set{} }
// Toffee
var Exception: Exception { get{} set{} }
Exception Exception { __get; __set; }
Property Exception() As Exception?
GetContentAsBinary
Returns the response as binary.
method GetContentAsBinary(contentCallback: not nullable HttpContentResponseBlock<ImmutableBinary>)
void GetContentAsBinary(HttpContentResponseBlock<ImmutableBinary>! contentCallback)
func GetContentAsBinary(_ contentCallback: HttpContentResponseBlock<ImmutableBinary>)
void GetContentAsBinary(HttpContentResponseBlock<ImmutableBinary> contentCallback)
Sub GetContentAsBinary(contentCallback As HttpContentResponseBlock<ImmutableBinary>)
Parameters:
- contentCallback:
GetContentAsBinarySynchronous
Returns the response as binary.
method GetContentAsBinarySynchronous: not nullable ImmutableBinary
ImmutableBinary! GetContentAsBinarySynchronous()
func GetContentAsBinarySynchronous() -> ImmutableBinary
ImmutableBinary GetContentAsBinarySynchronous()
Function GetContentAsBinarySynchronous() As ImmutableBinary
GetContentAsJson
Returns the response as json.
method GetContentAsJson(contentCallback: not nullable HttpContentResponseBlock<JsonDocument>)
void GetContentAsJson(HttpContentResponseBlock<JsonDocument>! contentCallback)
func GetContentAsJson(_ contentCallback: HttpContentResponseBlock<JsonDocument>)
void GetContentAsJson(HttpContentResponseBlock<JsonDocument> contentCallback)
Sub GetContentAsJson(contentCallback As HttpContentResponseBlock<JsonDocument>)
Parameters:
- contentCallback:
GetContentAsJsonSynchronous
Returns the response as json.
method GetContentAsJsonSynchronous: not nullable JsonDocument
JsonDocument! GetContentAsJsonSynchronous()
func GetContentAsJsonSynchronous() -> JsonDocument
JsonDocument GetContentAsJsonSynchronous()
Function GetContentAsJsonSynchronous() As JsonDocument
GetContentAsString
Returns the response as string.
method GetContentAsString(aEncoding: Encoding := nil; contentCallback: not nullable HttpContentResponseBlock<String>)
void GetContentAsString(Encoding aEncoding = null, HttpContentResponseBlock<String>! contentCallback)
func GetContentAsString(_ aEncoding: Encoding = nil, _ contentCallback: HttpContentResponseBlock<String>)
void GetContentAsString(Encoding aEncoding, HttpContentResponseBlock<String> contentCallback)
Sub GetContentAsString(aEncoding As Encoding = Null, contentCallback As HttpContentResponseBlock<String>)
Parameters:
- aEncoding:
- contentCallback:
GetContentAsStringSynchronous
Returns the response as string.
method GetContentAsStringSynchronous(aEncoding: Encoding := nil): not nullable String
String! GetContentAsStringSynchronous(Encoding aEncoding = null)
func GetContentAsStringSynchronous(_ aEncoding: Encoding = nil) -> String
String GetContentAsStringSynchronous(Encoding aEncoding)
Function GetContentAsStringSynchronous(aEncoding As Encoding = Null) As String
Parameters:
- aEncoding:
GetContentAsXml
Returns the response as xml.
method GetContentAsXml(contentCallback: not nullable HttpContentResponseBlock<XmlDocument>)
void GetContentAsXml(HttpContentResponseBlock<XmlDocument>! contentCallback)
func GetContentAsXml(_ contentCallback: HttpContentResponseBlock<XmlDocument>)
void GetContentAsXml(HttpContentResponseBlock<XmlDocument> contentCallback)
Sub GetContentAsXml(contentCallback As HttpContentResponseBlock<XmlDocument>)
Parameters:
- contentCallback:
GetContentAsXmlSynchronous
Returns the response as xml.
method GetContentAsXmlSynchronous: not nullable XmlDocument
XmlDocument! GetContentAsXmlSynchronous()
func GetContentAsXmlSynchronous() -> XmlDocument
XmlDocument GetContentAsXmlSynchronous()
Function GetContentAsXmlSynchronous() As XmlDocument
Headers
property Headers: not nullable ImmutableDictionary<String, String> read;
ImmutableDictionary<String, String>! Headers { get; }
var Headers: ImmutableDictionary<String, String> { get{} }
ImmutableDictionary<String, String> Headers { __get; }
ReadOnly Property Headers() As ImmutableDictionary<String, String>
SaveContentAsFile
method SaveContentAsFile(aTargetFile: not nullable String; contentCallback: not nullable HttpContentResponseBlock<File>)
void SaveContentAsFile(String! aTargetFile, HttpContentResponseBlock<File>! contentCallback)
func SaveContentAsFile(_ aTargetFile: String, _ contentCallback: HttpContentResponseBlock<File>)
void SaveContentAsFile(String aTargetFile, HttpContentResponseBlock<File> contentCallback)
Sub SaveContentAsFile(aTargetFile As String, contentCallback As HttpContentResponseBlock<File>)
Parameters:
- aTargetFile:
- contentCallback:
SaveContentAsFileSynchronous
Save the response content to a file.
method SaveContentAsFileSynchronous(aTargetFile: File)
void SaveContentAsFileSynchronous(File aTargetFile)
func SaveContentAsFileSynchronous(_ aTargetFile: File)
void SaveContentAsFileSynchronous(File aTargetFile)
Sub SaveContentAsFileSynchronous(aTargetFile As File)
Parameters:
- aTargetFile:
Success
True if this response is a success response.
property Success: Boolean read;
Boolean Success { get; }
var Success: Boolean { get{} }
Boolean Success { __get; }
ReadOnly Property Success() As Boolean
TryGetContentAsBinarySynchronous
method TryGetContentAsBinarySynchronous: nullable ImmutableBinary
ImmutableBinary? TryGetContentAsBinarySynchronous()
// Toffee
func TryGetContentAsBinarySynchronous() -> ImmutableBinary
// ToffeeV2
func TryGetContentAsBinarySynchronous() -> ImmutableBinary?
ImmutableBinary TryGetContentAsBinarySynchronous()
Function TryGetContentAsBinarySynchronous() As ImmutableBinary?
TryGetContentAsJsonSynchronous
Gets the content as json, returning null for failure.
method TryGetContentAsJsonSynchronous: nullable JsonDocument
JsonDocument? TryGetContentAsJsonSynchronous()
// Toffee
func TryGetContentAsJsonSynchronous() -> JsonDocument
// ToffeeV2
func TryGetContentAsJsonSynchronous() -> JsonDocument?
JsonDocument TryGetContentAsJsonSynchronous()
Function TryGetContentAsJsonSynchronous() As JsonDocument?
TryGetContentAsXmlSynchronous
Gets the content as xml, returning null for failure.
method TryGetContentAsXmlSynchronous: nullable XmlDocument
XmlDocument? TryGetContentAsXmlSynchronous()
// Toffee
func TryGetContentAsXmlSynchronous() -> XmlDocument
// ToffeeV2
func TryGetContentAsXmlSynchronous() -> XmlDocument?
XmlDocument TryGetContentAsXmlSynchronous()
Function TryGetContentAsXmlSynchronous() As XmlDocument?
Code
Http code.
property Code: Int32 read;
Int32 Code { get; }
var Code: Int32 { get{} }
Integer Code { __get; }
ReadOnly Property Code() As Int32
ContentEncoding
property ContentEncoding: nullable String read;
String? ContentEncoding { get; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var ContentEncoding: String? { get{} }
// Toffee
var ContentEncoding: String { get{} }
String ContentEncoding { __get; }
ReadOnly Property ContentEncoding() As String?
ContentType
property ContentType: nullable String read;
String? ContentType { get; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var ContentType: String? { get{} }
// Toffee
var ContentType: String { get{} }
String ContentType { __get; }
ReadOnly Property ContentType() As String?
Exception
Exception retrieving this request.
property Exception: nullable Exception read write;
Exception? Exception { get; set; }
// .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
var Exception: Exception? { get{} set{} }
// Toffee
var Exception: Exception { get{} set{} }
Exception Exception { __get; __set; }
Property Exception() As Exception?
Headers
property Headers: not nullable ImmutableDictionary<String, String> read;
ImmutableDictionary<String, String>! Headers { get; }
var Headers: ImmutableDictionary<String, String> { get{} }
ImmutableDictionary<String, String> Headers { __get; }
ReadOnly Property Headers() As ImmutableDictionary<String, String>
Success
True if this response is a success response.
property Success: Boolean read;
Boolean Success { get; }
var Success: Boolean { get{} }
Boolean Success { __get; }
ReadOnly Property Success() As Boolean
Dispose .NET, .NET Core 6.0, .NET Standard 2.0, Island, ToffeeV2
Dispose this class and resources attached to it.
method Dispose
void Dispose()
func Dispose()
Sub Dispose()
GetContentAsBinary
Returns the response as binary.
method GetContentAsBinary(contentCallback: not nullable HttpContentResponseBlock<ImmutableBinary>)
void GetContentAsBinary(HttpContentResponseBlock<ImmutableBinary>! contentCallback)
func GetContentAsBinary(_ contentCallback: HttpContentResponseBlock<ImmutableBinary>)
void GetContentAsBinary(HttpContentResponseBlock<ImmutableBinary> contentCallback)
Sub GetContentAsBinary(contentCallback As HttpContentResponseBlock<ImmutableBinary>)
Parameters:
- contentCallback:
GetContentAsBinarySynchronous
Returns the response as binary.
method GetContentAsBinarySynchronous: not nullable ImmutableBinary
ImmutableBinary! GetContentAsBinarySynchronous()
func GetContentAsBinarySynchronous() -> ImmutableBinary
ImmutableBinary GetContentAsBinarySynchronous()
Function GetContentAsBinarySynchronous() As ImmutableBinary
GetContentAsJson
Returns the response as json.
method GetContentAsJson(contentCallback: not nullable HttpContentResponseBlock<JsonDocument>)
void GetContentAsJson(HttpContentResponseBlock<JsonDocument>! contentCallback)
func GetContentAsJson(_ contentCallback: HttpContentResponseBlock<JsonDocument>)
void GetContentAsJson(HttpContentResponseBlock<JsonDocument> contentCallback)
Sub GetContentAsJson(contentCallback As HttpContentResponseBlock<JsonDocument>)
Parameters:
- contentCallback:
GetContentAsJsonSynchronous
Returns the response as json.
method GetContentAsJsonSynchronous: not nullable JsonDocument
JsonDocument! GetContentAsJsonSynchronous()
func GetContentAsJsonSynchronous() -> JsonDocument
JsonDocument GetContentAsJsonSynchronous()
Function GetContentAsJsonSynchronous() As JsonDocument
GetContentAsString
Returns the response as string.
method GetContentAsString(aEncoding: Encoding := nil; contentCallback: not nullable HttpContentResponseBlock<String>)
void GetContentAsString(Encoding aEncoding = null, HttpContentResponseBlock<String>! contentCallback)
func GetContentAsString(_ aEncoding: Encoding = nil, _ contentCallback: HttpContentResponseBlock<String>)
void GetContentAsString(Encoding aEncoding, HttpContentResponseBlock<String> contentCallback)
Sub GetContentAsString(aEncoding As Encoding = Null, contentCallback As HttpContentResponseBlock<String>)
Parameters:
- aEncoding:
- contentCallback:
GetContentAsStringSynchronous
Returns the response as string.
method GetContentAsStringSynchronous(aEncoding: Encoding := nil): not nullable String
String! GetContentAsStringSynchronous(Encoding aEncoding = null)
func GetContentAsStringSynchronous(_ aEncoding: Encoding = nil) -> String
String GetContentAsStringSynchronous(Encoding aEncoding)
Function GetContentAsStringSynchronous(aEncoding As Encoding = Null) As String
Parameters:
- aEncoding:
GetContentAsXml
Returns the response as xml.
method GetContentAsXml(contentCallback: not nullable HttpContentResponseBlock<XmlDocument>)
void GetContentAsXml(HttpContentResponseBlock<XmlDocument>! contentCallback)
func GetContentAsXml(_ contentCallback: HttpContentResponseBlock<XmlDocument>)
void GetContentAsXml(HttpContentResponseBlock<XmlDocument> contentCallback)
Sub GetContentAsXml(contentCallback As HttpContentResponseBlock<XmlDocument>)
Parameters:
- contentCallback:
GetContentAsXmlSynchronous
Returns the response as xml.
method GetContentAsXmlSynchronous: not nullable XmlDocument
XmlDocument! GetContentAsXmlSynchronous()
func GetContentAsXmlSynchronous() -> XmlDocument
XmlDocument GetContentAsXmlSynchronous()
Function GetContentAsXmlSynchronous() As XmlDocument
SaveContentAsFile
method SaveContentAsFile(aTargetFile: not nullable String; contentCallback: not nullable HttpContentResponseBlock<File>)
void SaveContentAsFile(String! aTargetFile, HttpContentResponseBlock<File>! contentCallback)
func SaveContentAsFile(_ aTargetFile: String, _ contentCallback: HttpContentResponseBlock<File>)
void SaveContentAsFile(String aTargetFile, HttpContentResponseBlock<File> contentCallback)
Sub SaveContentAsFile(aTargetFile As String, contentCallback As HttpContentResponseBlock<File>)
Parameters:
- aTargetFile:
- contentCallback:
SaveContentAsFileSynchronous
Save the response content to a file.
method SaveContentAsFileSynchronous(aTargetFile: File)
void SaveContentAsFileSynchronous(File aTargetFile)
func SaveContentAsFileSynchronous(_ aTargetFile: File)
void SaveContentAsFileSynchronous(File aTargetFile)
Sub SaveContentAsFileSynchronous(aTargetFile As File)
Parameters:
- aTargetFile:
TryGetContentAsBinarySynchronous
method TryGetContentAsBinarySynchronous: nullable ImmutableBinary
ImmutableBinary? TryGetContentAsBinarySynchronous()
// Toffee
func TryGetContentAsBinarySynchronous() -> ImmutableBinary
// ToffeeV2
func TryGetContentAsBinarySynchronous() -> ImmutableBinary?
ImmutableBinary TryGetContentAsBinarySynchronous()
Function TryGetContentAsBinarySynchronous() As ImmutableBinary?
TryGetContentAsJsonSynchronous
Gets the content as json, returning null for failure.
method TryGetContentAsJsonSynchronous: nullable JsonDocument
JsonDocument? TryGetContentAsJsonSynchronous()
// Toffee
func TryGetContentAsJsonSynchronous() -> JsonDocument
// ToffeeV2
func TryGetContentAsJsonSynchronous() -> JsonDocument?
JsonDocument TryGetContentAsJsonSynchronous()
Function TryGetContentAsJsonSynchronous() As JsonDocument?
TryGetContentAsXmlSynchronous
Gets the content as xml, returning null for failure.
method TryGetContentAsXmlSynchronous: nullable XmlDocument
XmlDocument? TryGetContentAsXmlSynchronous()
// Toffee
func TryGetContentAsXmlSynchronous() -> XmlDocument
// ToffeeV2
func TryGetContentAsXmlSynchronous() -> XmlDocument?
XmlDocument TryGetContentAsXmlSynchronous()
Function TryGetContentAsXmlSynchronous() As XmlDocument?