SmartEndpoint.Response
Wisej.AI.SmartEndpoint Response
Last updated
Wisej.AI.SmartEndpoint Response
Last updated
Namespace: Wisej.AI
Assembly: Wisej.AI (3.5.0.0)
Represents a response that can be initialized with a stream or a string and provides methods to read its content.
Initializes a new instance of the class with the specified stream.
stream
The stream to initialize the response with.
Throws:
Thrown when the stream is null.
Initializes a new instance of the class with the specified string.
response
The string to initialize the response with.
Throws:
Thrown when the response is null.
The returned stream is a copy of the original stream, allowing for independent reading without affecting the original stream's position.
Asynchronously reads the content of the response as a byte array.
This method reads the entire content of the stream and returns it as a byte array.
Asynchronously reads the content of the response as a string.
This method reads the entire content of the stream and returns it as a string.
: Gets a copy of the underlying stream.
Returns: . A task that represents the asynchronous read operation. The task result contains the content of the response as a byte array.
Returns: . A task that represents the asynchronous read operation. The task result contains the content of the response as a string.