Class ThirdwebHttpContent
- Namespace
- Thirdweb
- Assembly
- Thirdweb.dll
Represents HTTP content used in the Thirdweb SDK.
public class ThirdwebHttpContent
- Inheritance
-
ThirdwebHttpContent
- Inherited Members
Constructors
ThirdwebHttpContent(byte[])
Initializes a new instance of the ThirdwebHttpContent class from a byte array.
public ThirdwebHttpContent(byte[] content)
Parameters
content
byte[]The content byte array.
Exceptions
- ArgumentNullException
Thrown if the content is null.
ThirdwebHttpContent(Stream)
Initializes a new instance of the ThirdwebHttpContent class from a stream.
public ThirdwebHttpContent(Stream content)
Parameters
content
StreamThe content stream.
Exceptions
- ArgumentNullException
Thrown if the content is null.
ThirdwebHttpContent(string)
Initializes a new instance of the ThirdwebHttpContent class from a string.
public ThirdwebHttpContent(string content)
Parameters
content
stringThe content string.
Exceptions
- ArgumentNullException
Thrown if the content is null.
Methods
ReadAsByteArrayAsync()
Reads the content as a byte array.
public Task<byte[]> ReadAsByteArrayAsync()
Returns
- Task<byte[]>
A task that represents the asynchronous operation. The task result contains the content byte array.
ReadAsStreamAsync()
Reads the content as a stream.
public Task<Stream> ReadAsStreamAsync()
Returns
- Task<Stream>
A task that represents the asynchronous operation. The task result contains the content stream.
ReadAsStringAsync()
Reads the content as a string.
public Task<string> ReadAsStringAsync()