Is PUT similar to POST?
I’m getting some inbound requests (apache) with this:
[REQUEST_METHOD] => PUT
I’ve never worked with this request method before. So I have to ask if I’m supposed to process it differently.
The people sending me data are claiming to be sending xml. So my script has this:
<?php
if(isset($HTTP_RAW_POST_DATA)) {
mail("me@myemail.com","some title i want", print_r($HTTP_RAW_POST_DATA, true));
}else{
die("not post data");
}
?>
I’m stuck here now. If there’s a PUT request, do I replace $HTTP_RAW_POST_DATA with something else?
According to the php docs,
PUTdata can be read using thephp://inputstream (which is preferred over$HTTP_RAW_POST_DATA).