Skip to content

Commit

Permalink
Type body as Chunk to correctly calculate the byte length
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinresol committed Aug 16, 2018
1 parent a8f29a6 commit ca7ae04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tink/web/macros/Proxify.hx
Expand Up @@ -126,13 +126,13 @@ class Proxify {
case Some(v):
endPoint = macro $endPoint.sub({ headers: [
new tink.http.Header.HeaderField('content-type', $v{v}),
new tink.http.Header.HeaderField('content-length', haxe.io.Bytes.ofString(__body__).length),
new tink.http.Header.HeaderField('content-length', __body__.length),
]});
case None:
}

macro @:pos(f.field.pos) {
var __body__ = $body;
var __body__:tink.Chunk = $body;
return $endPoint.request(
this.client,
cast $v{method},
Expand Down

0 comments on commit ca7ae04

Please sign in to comment.