Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $client = new GuzzleHttpClient();
- try {
- $request = new GuzzleHttpPsr7Request('PUT', config('cms.api.backend') .'/products/'. $nid,
- [
- 'auth' => [config('cms.api.user'), config('cms.api.password')],
- 'form_params' => [
- 'copywrite' => Input::get('copywrite'),
- 'status' => $status
- ],
- ]);
- $promise = $client->sendAsync($request)->then(function ($response) {});
- $promise->wait();
- }
- catch (RequestException $e) {
- $this->logHttpError($e->getResponse()->getStatusCode(), $e->getResponse()->getBody(true));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement