
## StringContent class

Represents content based on a string.



**Inheritance:** [`StringContent`](/html/python-net/aspose.html.net/stringcontent) → 
[`ByteArrayContent`](/html/python-net/aspose.html.net/bytearraycontent) → 
[`Content`](/html/python-net/aspose.html.net/content)



The StringContent type exposes the following members:

### Constructors
| Constructor | Description |
| :- | :- |
| [__init__](/html/python-net/aspose.html.net/stringcontent/__init__/#str) | Initializes a new instance of the [`StringContent`](/html/python-net/aspose.html.net/stringcontent) class. |
| [__init__](/html/python-net/aspose.html.net/stringcontent/__init__/#str-System.Text.Encoding) | Initializes a new instance of the [`StringContent`](/html/python-net/aspose.html.net/stringcontent) class. |
| [__init__](/html/python-net/aspose.html.net/stringcontent/__init__/#str-System.Text.Encoding-str) | Initializes a new instance of the [`StringContent`](/html/python-net/aspose.html.net/stringcontent) class. |


### Properties
| Property | Description |
| :- | :- |
| [headers](/html/python-net/aspose.html.net/stringcontent/headers) | Gets the HTTP content headers. |


### Methods
| Method | Description |
| :- | :- |
| [read_as_stream](/html/python-net/aspose.html.net/stringcontent/read_as_stream/#) | Serialize the HTTP content and return a stream that represents the content. |
| [read_as_byte_array](/html/python-net/aspose.html.net/stringcontent/read_as_byte_array/#) | Serialize the HTTP content and return a byte array that represents the content. |
| [read_as_string](/html/python-net/aspose.html.net/stringcontent/read_as_string/#) | Serialize the HTTP content and return a string that represents the content. |



### See Also
* module [`aspose.html.net`](..)
* class [`ByteArrayContent`](/html/python-net/aspose.html.net/bytearraycontent)
* class [`Content`](/html/python-net/aspose.html.net/content)
* class [`StringContent`](/html/python-net/aspose.html.net/stringcontent)
