March 2020
Intermediate to advanced
392 pages
10h 10m
English
This controller interacts with the user and will reference out inputs and outputs.
import Fluentimport Vaporfinal class OrderController {}
This is just an empty controller, so let's add a few functions.
func list(req: Request) throws -> EventLoopFuture<[Order]> { } func listMine(req: Request) throws -> EventLoopFuture<[Order]> { } func postPayment(req: Request) throws -> EventLoopFuture<AddedPaymentResponse> { } func post(req: Request) throws -> EventLoopFuture<OrderResponse> { }
Read now
Unlock full access