public function testPostStringBody() { $uri = 'http://httpbin.org/post'; $client = new Client(); $body = 'zanzibar'; $request = (new Request())->setUri($uri)->setMethod('POST')->setBody($body); $promise = $client->request($request); $response = \Amp\wait($promise); $this->assertInstanceOf('Amp\\Artax\\Response', $response); $result = json_decode($response->getBody()); $this->assertEquals($body, $result->data); }