Permalink
Browse files

Merge pull request #20 from thomb2233/feature/additional-headers

[web api context] - allow additional headers to be set
  • Loading branch information...
2 parents 5850461 + 8535030 commit ac7499e648cc2f786a912e1adb4d5d40bdb40e38 @everzet everzet committed May 11, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 Behat/CommonContexts/WebApiContext.php
@@ -56,6 +56,19 @@ public function iAmAuthenticatingAs($username, $password)
}
/**
+ * Sets a HTTP Header.
+ *
+ * @param string $name header name
+ * @param string $value header value
+ *
+ * @Given /^I set header "([^"]*)" with value "([^"]*)"$/
+ */
+ public function iSetHeaderWithValue($name, $value)
+ {
+ $this->addHeader($name.': '.$value);
+ }
+
+ /**
* Sends HTTP request to specific relative URL.
*
* @param string $method request method

0 comments on commit ac7499e

Please sign in to comment.