Fix HTTP request snippet's handling of query strings and params
Closes gh-763
This commit is contained in:
@@ -224,6 +224,14 @@ public class HttpRequestSnippetTests extends AbstractSnippetTests {
|
||||
.header("Content-Type", "application/x-www-form-urlencoded").content("b%26r=baz&a=alpha"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void putRequestWithTotallyOverlappingQueryStringAndParameters() throws IOException {
|
||||
new HttpRequestSnippet().document(this.operationBuilder.request("http://localhost/foo?a=alpha&b=bravo")
|
||||
.method("PUT").param("a", "alpha").param("b", "bravo").build());
|
||||
assertThat(this.generatedSnippets.httpRequest())
|
||||
.is(httpRequest(RequestMethod.PUT, "/foo?a=alpha&b=bravo").header(HttpHeaders.HOST, "localhost"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void multipartPost() throws IOException {
|
||||
new HttpRequestSnippet().document(this.operationBuilder.request("http://localhost/upload").method("POST")
|
||||
|
||||
Reference in New Issue
Block a user