src/Client/EventClient.php
public function post(PagerDutyEntityInterface $pagerDutyEntity)
    {
        $data = null;

        try {
            $response = $this->getHttpClient()->post(
                $this->getResourceUrl($pagerDutyEntity),
                $this->headers,
                $this->getRepresentProcessor()->representJSON($pagerDutyEntity)
            );

            $data = $this->performResponse($response);
        } catch (HttpClientException $exception) {
            throw EventClientTransportException::transportProblem($exception);
        } catch (EventValidationResponseException $exception) {
            throw ResponseDataValidationException::validationFail($exception);
        }

        return $data;
    }
public function post(PagerDutyEntityInterface $pagerDutyEntity)
    {
        $data = null;

        try {
            $response = $this->getHttpClient()->post(
                $this->getResourceUrl($pagerDutyEntity),
                $this->headers,
                $this->getRepresentProcessor()->representJSON($pagerDutyEntity)
            );

            $data = $this->performResponse($response);
        } catch (HttpClientException $exception) {
            throw EventClientTransportException::transportProblem($exception);
        } catch (EventValidationResponseException $exception) {
            throw ResponseDataValidationException::validationFail($exception);
        }

        return $data;
    }
public function post ( PagerDutyEntityInterface $ pagerDutyEntity ) { $ data = null ; try { $ response = $ this -> getHttpClient ( ) -> post ( $ this -> getResourceUrl ( $ pagerDutyEntity ) , $ this -> headers , $ this -> getRepresentProcessor ( ) -> representJSON ( $ pagerDutyEntity ) ) ; $ data = $ this -> performResponse ( $ response ) ; } catch ( HttpClientException $ exception ) { throw EventClientTransportException :: transportProblem ( $ exception ) ; } catch ( EventValidationResponseException $ exception ) { throw ResponseDataValidationException :: validationFail ( $ exception ) ; } return $ data ; }
Make HTTP POST Request to the Event api.

@param PagerDutyEntityInterface $pagerDutyEntity

@return stdClass

@throws EventClientTransportException
@throws ResponseDataValidationException
Make HTTP POST Request to the Event api .