Example #1
0
 /**
  * @param Article $entity
  */
 public function postArticle(Article $entity)
 {
     $guzzle = new GuzzleClient(['base_uri' => $this->endpoint]);
     $result = $guzzle->request('POST', '/articles', ['json' => ['article' => ['title' => $entity->getTitle(), 'leading' => $entity->getLeading(), 'createdBy' => $entity->getCreatedBy(), 'body' => $entity->getBody()]]]);
 }