$authorization
This commit is contained in:
@@ -175,9 +175,9 @@ abstract class BaseController extends Controller
|
||||
$ch = curl_init( $url );
|
||||
# Setup request to send json via POST.
|
||||
$payload = json_encode( $params );
|
||||
|
||||
$authorization = "Authorization: Bearer ".$ansibleToken; // Prepare the authorisation token
|
||||
curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json',$authorization));
|
||||
# Return response instead of printing.
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
# Fetch the headers, not the body content:
|
||||
|
||||
Reference in New Issue
Block a user