Skip to content

Commit 5afa317

Browse files
keichan34txase
authored andcommitted
Send body regardless of what the HTTP method is.
This allows PUT and PATCH requests, for example.
1 parent 9daecf1 commit 5afa317

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

bootstrap

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,7 @@ while (true) {
171171
}
172172

173173
if (strlen($body) > 0) {
174-
if($event['httpMethod'] === 'POST'){
175-
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
176-
}
177-
curl_setopt($ch, CURLOPT_INFILESIZE, strlen($body));
178-
curl_setopt($ch, CURLOPT_READFUNCTION, function ($ch, $fd, $length) use ($body) {
179-
return $body;
180-
});
174+
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
181175
}
182176

183177
$response = array();

build-php-remi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/bash -e
22

33
PHP_MINOR_VERSION=$1
44

0 commit comments

Comments
 (0)