Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

guzzlehttp http_errors get

public function getTracking(string $search)
    {
        try {
            $data = $this->client->get($this->tracking_request_url.$search.'/history_items');
        } catch (Exception $exception) {
            $data = null;
        }
        if (is_null($data)) {
            return $this->page_container->setPage(new TrackingPageViewModel());
        } else {
            return $this->page_container->setPage(new TrackingPageViewModel(json_decode($data->getBody()->getContents(), true)));

        }

    }
 
PREVIOUS NEXT
Tagged: #guzzlehttp
ADD COMMENT
Topic
Name
7+9 =