Hi, Guys! I’m trying to do a PUT request and don’t see on the docs if it is possible. Can you guys help me? @marcos.figueiredo
Hey @vinimenezes
You can set the CURLOPT parameters in the Jestor.curlCall method. So you can do something like this to send a PUT call.
$url = "https://yourendpointgoeshere";
$data = array(
"name" => "Example",
"amount" => 1000
);
$payload = json_encode($data);
$response = Jestor.curlCall($url,array(
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS,
CURLOPT_POSTFIELDS => $payload
));
Hope that helps!