Skip to content

Commit ab30c06

Browse files
committed
send post data to backend when request method is post
1 parent 2a7eb84 commit ab30c06

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bootstrap

+3
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ while (true) {
156156
}
157157

158158
if (strlen($body) > 0) {
159+
if($event['httpMethod'] === 'POST'){
160+
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
161+
}
159162
curl_setopt($ch, CURLOPT_INFILESIZE, strlen($body));
160163
curl_setopt($ch, CURLOPT_READFUNCTION, function ($ch, $fd, $length) use ($body) {
161164
return $body;

0 commit comments

Comments
 (0)