-
Notifications
You must be signed in to change notification settings - Fork 37.7k
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
WebClients awaitBody throws Exception when expecting "Unit" #26491
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: superseded
An issue that has been superseded by another
type: documentation
A documentation task
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Feb 2, 2021
Current workaround:
|
rstoyanchev
added
the
in: web
Issues in web modules (web, webmvc, webflux, websocket)
label
Feb 3, 2021
sdeleuze
added
type: documentation
A documentation task
and removed
status: waiting-for-triage
An issue we've not yet triaged or decided on
labels
Feb 3, 2021
You should probably use |
2 thoughts:
|
gaerfield
added a commit
to gaerfield/spring-framework
that referenced
this issue
Feb 3, 2021
allow WebClient.ResponseSpec.awaitBody() to be used in combination with Type "Unit"
@sdeleuze I have created a pull-request with allowing |
rstoyanchev
added
the
status: superseded
An issue that has been superseded by another
label
Feb 4, 2021
Superseded by #26504. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: superseded
An issue that has been superseded by another
type: documentation
A documentation task
Affected component: spring-webflux
Version: 5.3.2
When using the Kotlin-Extensions for WebClient on Endpoints that do not return any data,
awaitBody<Unit>
is throwingjava.util.NoSuchElementException: No value received via onNext for awaitSingle
.I was thinking I may accidentally misuse the API, but spring-docs document also this call:
Reproduction:
Given the following controller:
And this Unit-Test:
The test will fail with
The text was updated successfully, but these errors were encountered: