Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = env('API_USERNAME');
- $password = env('API_PASSWORD');
- $credentials = base64_encode($username.':'.$password);
- $client = new Client([
- // Base URI is used with relative requests
- 'base_uri' => 'https://api.amorc.org.br/v1/',
- ]);
- try {
- // $query = http_build_query($vars, null, '&');
- $params = "seq_cadast_oa_atuaca=258461";
- @$response = $client->request('PUT', "membros/144343/1",
- [
- 'verify' => false,
- 'headers' => ['Authorization' => 'Basic ' . $credentials],
- 'query' => $params
- ]);
- $content = $response->getBody()->getContents();
- $obj = \GuzzleHttp\json_decode($content, false);
- return $obj;
- }catch (\Exception $e){
- throw new WebServiceException();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement