We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e513cf4 commit 48ff11aCopy full SHA for 48ff11a
tests/ClientTest.php
@@ -157,4 +157,20 @@ public function testParseHeaderNotArray()
157
158
$this->assertFalse($method->invoke($client, 123));
159
}
160
+
161
+ /**
162
+ * @test
163
+ */
164
+ public function testBasicPostWithHeaders()
165
+ {
166
+ $client = new Client();
167
+ $headers = [
168
+ 'Accept' => 'application/json',
169
+ 'Content-Type' => 'text/xml;charset=UTF-8',
170
+ ];
171
+ $response = $client->post('http://www.google.com/', 'test=test&a=b', $headers);
172
+ $this->assertEquals(405, $response->getStatusCode());
173
+ $this->assertEquals('1.1', $response->getProtocolVersion());
174
+ $this->assertNotEmpty($response->getBody());
175
+ }
176
0 commit comments