Skip to content

Commit e18f92e

Browse files
authored
Merge pull request #349 from phpclassic/Content-Length-header
Content-Length Header for GraphQL
2 parents 0f08bf8 + c6eb4e2 commit e18f92e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/HttpRequestGraphQL.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ protected static function prepareRequest($httpHeaders = array(), $data = array()
5252
} else {
5353
self::$postDataGraphQL = json_encode(['query' => $data]);
5454
}
55+
56+
self::$httpHeaders['Content-Length'] = strlen(self::$postDataGraphQL);
5557
}
5658

5759
/**

0 commit comments

Comments
 (0)