Update webpagetool.php
This commit is contained in:
parent
b6f75980d2
commit
cc79e17b93
|
@ -133,8 +133,10 @@ if(!check_function_exists("get_web_cmd")) {
|
|||
$headers['Content-Type'] = "application/json;charset=utf-8";
|
||||
$headers['Accept'] = "application/json, text/plain, */*";
|
||||
} else {
|
||||
// possible: application/octet-stream (RFC2046)
|
||||
$_data = $data;
|
||||
$headers['Content-Type'] = "text/plain"; // possible: application/octet-stream (RFC2046)
|
||||
$headers['Content-Type'] = "text/plain;charset=utf-8";
|
||||
$headers['Accept'] = "text/plain, */*";
|
||||
}
|
||||
|
||||
// get content size
|
||||
|
@ -345,6 +347,16 @@ if(!check_function_exists("get_web_curl")) {
|
|||
$headers['Accept'] = "application/json, text/plain, */*";
|
||||
$headers['Content-Length'] = strlen($_data);
|
||||
}
|
||||
|
||||
if($method == "rawdata") {
|
||||
$_data = $data;
|
||||
$options[CURLOPT_CUSTOMREQUEST] = "POST";
|
||||
$options[CURLOPT_POST] = 1;
|
||||
$options[CURLOPT_POSTFIELDS] = $_data;
|
||||
$headers['Content-Type'] = "text/plain;charset=utf-8";
|
||||
$headers['Accept'] = "text/plain, */*";
|
||||
$headers['Content-Length'] = strlen($_data);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($headers) > 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user