In API POST /public/v1/sending_requests, unable get any response when doing a PUT to the response's upload_url

  • 1
  • Problem
  • Updated 1 year ago
I have successfully executed POST /public/v1/sending_requests and got upload_url for my file.
In its next step when I tried to do a put on my upload_url I found empty response from Right Signature server.

My script for PUT request is

$file_contents = file_get_contents('pdf.pdf');
$data = array("file" => $file_contents);
$payload = json_encode( $data );

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uploadedUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS,$payload);
curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch); print_r($response);

Please let me know where did I make a mistake.
Any help would be much appreciated!

Photo of Farqalit Nasir

Farqalit Nasir

  • 22 Posts
  • 0 Reply Likes
  • confused

Posted 1 year ago

  • 1

Be the first to post a reply!