buzz

How to send file data as post parameter in BuzzBrowser post call

点点圈 提交于 2019-12-01 19:57:57
I am using Buzz Browser for calling POST method. I am receiving a file from client at one of the end point . $fileObj = $requestObject->files->get('image_data'); This is correct fileObject . I have verified this using is_file() method. Now, I have to fire a Buzz Browser post event using this file as parameter. $headers = array('Content-Type'=>'multipart/form-data'); $url = $genericHost . $api; //A valid URL $params = array('image_data' => $fileObj);//fileObj obtained above Posting this info using buzzBrowser $browser->post($url, $headers, $params); And receiving it as- $fileObj = $this->get(

How to send file data as post parameter in BuzzBrowser post call

南楼画角 提交于 2019-12-01 18:40:14
问题 I am using Buzz Browser for calling POST method. I am receiving a file from client at one of the end point . $fileObj = $requestObject->files->get('image_data'); This is correct fileObject . I have verified this using is_file() method. Now, I have to fire a Buzz Browser post event using this file as parameter. $headers = array('Content-Type'=>'multipart/form-data'); $url = $genericHost . $api; //A valid URL $params = array('image_data' => $fileObj);//fileObj obtained above Posting this info