*/ class Attachment extends HttpApi { /** * @return ResponseInterface */ public function show(string $url) { Assert::stringNotEmpty($url); Assert::regex($url, '@https://.*mailgun\.(net|org)/v.+@'); Assert::regex($url, '|/attachments/[0-9]+|'); $response = $this->httpGet($url); if (200 !== $response->getStatusCode()) { $this->handleErrors($response); } return $response; } }