Community

Delete Tasks

Hello, I was looking for an option to delete image file at the end of the process. I used deleteTask method and it returns empty result. What I do wrong here?

    $deleteUrl = 'https://cloud.ocrsdk.com/deleteTask';
    $qry_str = "?taskid=$taskid";

    $curlHandle = curl_init();
    curl_setopt($curlHandle, CURLOPT_URL, $deleteUrl.$qry_str);
    curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, false);
    $deleteId = curl_exec($curlHandle);
    curl_close($curlHandle);
    echo $deleteId;

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Permanently deleted user

    You should make sure that the request has the correct header and body. You can use HTTP debugger for this task (Fiddler or any other that is suitable for your platform). However, doing this is easier on non-secure connection. For debug purposes try to use $deleteUrl = 'http://cloud.ocrsdk.com/deleteTask'; instead of 'https://cloud.ocrsdk.com/deleteTask'.

    However, for production use we strongly recommend using secure connections only.

    If the issue is still actual please send to CloudOCRSDK@abbyy.com:

    1. the name of your application,
    2. the image you recognize,
    3. logs from any HTTP debugger.
    0

Please sign in to leave a comment.