Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request parameters ignored for HTTP DELETE #683

Closed
giorgimode opened this issue Apr 27, 2020 · 0 comments
Closed

Request parameters ignored for HTTP DELETE #683

giorgimode opened this issue Apr 27, 2020 · 0 comments

Comments

@giorgimode
Copy link

In generated curl-request.adoc and http-request.adoc files the request parameters are ignored when using param builder:

this.mockMvc.perform(delete("/users").param("username", "Tester")) 
	.andExpect(status().isOk()) 
	.andDo(document("delete-user"))

However, this one works:

this.mockMvc.perform(delete("/users?username=Tester")) 
	.andExpect(status().isOk()) 
	.andDo(document("delete-user"))

I have tried using RestDocumentationRequestBuilders as well. Same result.
Generated curl-request.adoc:

[source,bash]
----
$ curl 'http://localhost:8080/users/' -i -X DELETE
----

How it looks like without using param builders:

[source,bash]
----
$ curl 'http://localhost:8080/users/?username=Tester' -i -X DELETE
----

Using:
org.springframework.boot:spring-boot:2.2.6.RELEASE
org.springframework.restdocs:spring-restdocs-mockmvc:2.0.4.RELEASE
org.springframework.restdocs:spring-restdocs-asciidoctor:2.0.4.RELEASE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants