Class FormDataControllerImpl
- java.lang.Object
-
- org.bremersee.web.reactive.function.client.proxy.app.FormDataControllerImpl
-
@RestController public class FormDataControllerImpl extends Object
The form data controller.In a WebFlux application, form data is accessed via
ServerWebExchange.getFormData()
. For this reason the controller can't implement the interface, because it's signature differs from this implementation.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description FormDataControllerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<String>
addOk(org.springframework.web.server.ServerWebExchange exchange)
Post form data.reactor.core.publisher.Mono<Map<String,Object>>
upload(String headerValue, String lastValue, org.springframework.web.server.ServerWebExchange exchange)
Upload mono.
-
-
-
Method Detail
-
addOk
@PostMapping(path="/api/oks", produces="text/plain", consumes="application/x-www-form-urlencoded") public reactor.core.publisher.Mono<String> addOk(org.springframework.web.server.ServerWebExchange exchange)
Post form data.- Parameters:
exchange
- the exchange with the form data- Returns:
- the result
-
upload
@RequestMapping(path="/upload", method=POST, consumes="application/x-www-form-urlencoded", produces="application/json") public reactor.core.publisher.Mono<Map<String,Object>> upload(@RequestHeader(name="x-ok-flag") String headerValue, @CookieValue(name="last") String lastValue, org.springframework.web.server.ServerWebExchange exchange)
Upload mono.- Parameters:
headerValue
- the header valuelastValue
- the last valueexchange
- the exchange with the form data- Returns:
- the result
-
-