may be you need to try below code. it will showing some response not an error.
you need to set post fields to true and also curl auto make query string for post fields.
either check your url .
http://www.trikoder.hr/api/v1/RequestJobApplication/
$handle = curl_init();
curl_setopt_array(
$handle,
array(
CURLOPT_URL => "http://www.trikoder.hr/api/v1/RequestJobApplication/",
CURLOPT_POST=> 1,
CURLOPT_POSTFIELDS => "email=xxx@gmail.com",
CURLOPT_RETURNTRANSFER => true
)
);
$response = curl_exec($handle);
$output = curl_getinfo($handle);
print_r($output);
curl_close($handle);
echo '<pre>';
print_r($response);
i have tried and output of curl info is ok need to check your end and
output is:-
Array ( [url] => http://www.trikoder.hr/api/v1/RequestJobApplication/ [content_type] => application/json; charset=utf-8 [http_code] => 200 [header_size] => 341 [request_size] => 172 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.904 [namelookup_time] => 0 [connect_time] => 0.421 [pretransfer_time] => 0.421 [size_upload] => 19 [size_download] => 132 [speed_download] => 146 [speed_upload] => 21 [download_content_length] => 132 [upload_content_length] => -1 [starttransfer_time] => 0.904 [redirect_time] => 0 )
for about put request follow :-
Send PUT request with PHP cURL