Mailjet\Client::post PHP Method

post() public method

Trigger a POST request
public post ( array $resource, array $args = [] ) : Response
$resource array Mailjet Resource/Action pair
$args array Request arguments
return Response
    public function post($resource, $args = [])
    {
        return $this->_call('POST', $resource[0], $resource[1], $args);
    }

Usage Example

コード例 #1
0
 function it_should_throw_exception_if_list_not_created(ContactListRepository $repository, ObjectManager $objectManager, Client $client, Response $response)
 {
     $repository->findOneByName(Argument::any())->willReturn(null);
     $client->post(Resources::$Contactslist, ['body' => ['Name' => 'ListName']])->willReturn($response);
     $response->success()->willReturn(false);
     $this->shouldThrow(ContactListNotCreated::CLASS)->duringConvert('list_name');
     $objectManager->persist(Argument::any())->shouldNotBeCalled();
     $objectManager->flush(Argument::any())->shouldNotBeCalled();
 }
All Usage Examples Of Mailjet\Client::post