Hi,
I am using vuforia web service php sample for implementing CMS in website i have integrated the sample in my backed. I have setup of http and pear but i getting 400 bad request error when post new target by using this sample. I am not able to understand where i am doing mistake.
following error i am getting.
POST a816017aadb6c187a9daef5f927cfd04 application/json Fri, 04 Nov 2016 18:01:08 GMT /targetsPOST a816017aadb6c187a9daef5f927cfd04 application/json Fri, 04 Nov 2016 18:01:08 GMT /targetsheader is iZXmDwBae0lUA6jKPLa3gsoyCdM=Unexpected HTTP status: 400 Bad Request {"result_code":"Fail","transaction_id":"a9422abd4edf4b88bf4acaf8b2cfad7f"}
this is the code for post new target.
private $url = "https://vws.vuforia.com"; private $requestPath = "/targets"; private $request; // the HTTP_Request2 object private $jsonRequestObject; private $targetName = "target"; // private $imageLocation = "[ /path/file.ext ]"; private $imageLocation = "uploads/target.jpg"; function PostNewTarget(){ $this->jsonRequestObject = json_encode( array( 'width'=>900.0 , 'name'=>$this->targetName , 'image'=>$this->getImageAsBase64() , 'application_metadata'=>base64_encode("Vuforia test metadata") , 'active_flag'=>1 ) );
// echo $this->jsonRequestObject;
$this->execPostNewTarget();
}
Hi,
Hi,
I have got the same error but i didn''t get any solution. If you got the solution then please tell me