Skip to content
Browse files

Update docs

  • Loading branch information...
1 parent 8dfcf94 commit 9eab54106ff7a90767edc7d1fa41f1ec9b5e1983 @pfleidi committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 docs/index.html
View
4 docs/index.html
@@ -273,7 +273,7 @@
<span class="keyword">if</span> (!<span class="variable">headers</span>[<span class="string">'Content-Type'</span>]) {
<span class="variable">headers</span>[<span class="string">'Content-Type'</span>] = <span class="string">'application/x-www-form-urlencoded'</span>;
}
- <span class="variable">headers</span>[<span class="string">'Content-Length'</span>] = <span class="variable">payload</span>.<span class="variable">length</span>;
+ <span class="variable">headers</span>[<span class="string">'Content-Length'</span>] = <span class="class">Buffer</span>.<span class="variable">byteLength</span>(<span class="variable">payload</span>);
<span class="variable">request</span> = <span class="variable">client</span>.<span class="variable">request</span>(<span class="variable">context</span>.<span class="variable">method</span>, <span class="variable">url</span>.<span class="variable">path</span>, <span class="variable">headers</span>);
<span class="variable">request</span>.<span class="variable">write</span>(<span class="variable">payload</span>, <span class="variable">context</span>.<span class="variable">encoding</span>);
} <span class="keyword">else</span> {
@@ -325,7 +325,7 @@
<span class="keyword">if</span> (!<span class="variable">headers</span>[<span class="string">'Content-Type'</span>]) {
<span class="variable">headers</span>[<span class="string">'Content-Type'</span>] = <span class="string">'application/x-www-form-urlencoded'</span>;
}
- <span class="variable">headers</span>[<span class="string">'Content-Length'</span>] = <span class="variable">payload</span>.<span class="variable">length</span>;
+ <span class="variable">headers</span>[<span class="string">'Content-Length'</span>] = <span class="class">Buffer</span>.<span class="variable">byteLength</span>(<span class="variable">payload</span>);
}
<span class="keyword">if</span> (<span class="variable">url</span>.<span class="variable">protocol</span> === <span class="string">'https:'</span>) {

0 comments on commit 9eab541

Please sign in to comment.
Something went wrong with that request. Please try again.