lantunes / fixd

An HTTP Server Fixture for Testing HTTP Clients and mocking web services, and a Java Micro Web Framework
http://bigtesting.org/fixd
Apache License 2.0
41 stars 6 forks source link

Add support for setting a particular header in the response #4

Closed lantunes closed 11 years ago

lantunes commented 11 years ago

We should be able to set a header in the response for a given request. For example:

server.handle(Method.GET, "/")
      .with(302, "text/plain", "page moved")
      .withHeader("Location", "http://localhost:8080/new-location");