DP
- No, Google has its own holy cow - the Go language was developed by people who failed the Plan9 and InfernoOS.
Size: a a a
DP
O
AM
O
(
val booksListing: Endpoint[(BooksFromYear, Limit, AuthToken), String, List[Book], Nothing] = endpoint
.get
.in(("books" / path[String]("genre") / path[Int]("year")).mapTo(BooksFromYear))
.in(query[Int]("limit").description("Maximum number of books to retrieve"))
.in(header[String]("X-Auth-Token"))
.errorOut(stringBody)
.out(jsonBody[List[Book]])
val booksListingRequest: Request[Either[String, List[Book]], Nothing] = booksListing
.toSttpRequest(uri"http://localhost:8080")
.apply(BooksFromYear("SF", 2016), 20, "xyz-abc-123")
(
d
(
d
(
d
I
val booksListing: Endpoint[(BooksFromYear, Limit, AuthToken), String, List[Book], Nothing] = endpoint
.get
.in(("books" / path[String]("genre") / path[Int]("year")).mapTo(BooksFromYear))
.in(query[Int]("limit").description("Maximum number of books to retrieve"))
.in(header[String]("X-Auth-Token"))
.errorOut(stringBody)
.out(jsonBody[List[Book]])
val booksListingRequest: Request[Either[String, List[Book]], Nothing] = booksListing
.toSttpRequest(uri"http://localhost:8080")
.apply(BooksFromYear("SF", 2016), 20, "xyz-abc-123")
(
d
AL
val booksListing: Endpoint[(BooksFromYear, Limit, AuthToken), String, List[Book], Nothing] = endpoint
.get
.in(("books" / path[String]("genre") / path[Int]("year")).mapTo(BooksFromYear))
.in(query[Int]("limit").description("Maximum number of books to retrieve"))
.in(header[String]("X-Auth-Token"))
.errorOut(stringBody)
.out(jsonBody[List[Book]])
val booksListingRequest: Request[Either[String, List[Book]], Nothing] = booksListing
.toSttpRequest(uri"http://localhost:8080")
.apply(BooksFromYear("SF", 2016), 20, "xyz-abc-123")
(
(
AL