Added readonly version of HttpHeaders

This commit is contained in:
Arjen Poutsma
2010-03-10 10:00:03 +00:00
parent 2dd1134303
commit f588ab05fa
4 changed files with 42 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -124,7 +124,7 @@ public abstract class AbstractHttpRequestFactoryTestCase {
}
}
@Test(expected = IllegalStateException.class)
@Test(expected = UnsupportedOperationException.class)
public void headersAfterExecute() throws Exception {
ClientHttpRequest request = factory.createRequest(new URI(BASE_URL + "/echo"), HttpMethod.POST);
request.getHeaders().add("MyHeader", "value");