addHeader() public method

Add a header to the headers array
public addHeader ( string $name, string $value ) : Google\Spreadsheet\DefaultServiceRequest
$name string
$value string
return Google\Spreadsheet\DefaultServiceRequest
 public function testInitRequest()
 {
     $method = new \ReflectionMethod(DefaultServiceRequest::class, "initRequest");
     $method->setAccessible(true);
     $request = new DefaultServiceRequest("token");
     $request->addHeader("k", "v");
     $result = $method->invoke($request, "http://test");
     $this->assertTrue(is_resource($result));
     $result = $method->invoke($request, "spreadsheet");
     $this->assertTrue(is_resource($result));
 }