ation", "json", charset: "utf-8");
request.write(...);  // Strings written will be UTF-8 encoded.
</code></pre>
<p>If no charset is provided the default of ISO-8859-1 (Latin 1) is
be used.</p>
<pre class="language-dart"><code>HttpClientRequest request = ...
request.headers.add(HttpHeaders.contentTypeHeader, "text/plain");
request.write(...);  // Strings written will be ISO-8859-1 encoded.
</code></pre>
<p>An exception is thrown if you use an unsupported encoding and the
<code>write()</code> method being use