am hitting an api call using curl and I am sending "X_ACCESSKEY" as header. Following is my code
$url = "http://127.0.0.1:8080/user/getheader";
$data=array();
$data = json_encode($data);
$ch = curl_init($url);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $data );
$headers = array('Content-Type:application/json','X_ACCESSKEY: 1234');
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers);
# Return response instead of printing.
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
# Send request.
$result = curl_exec($ch);
curl_close($ch);
Now I want to get the "X_ACCESSKEY" header value in "http://127.0.0.1:8080/user/getheader"