Skip to content

Instantly share code, notes, and snippets.

@adamw
Last active May 7, 2019 19:37
Show Gist options
  • Save adamw/4506342dc0e16e7b9d7b07790b7bea0b to your computer and use it in GitHub Desktop.
Save adamw/4506342dc0e16e7b9d7b07790b7bea0b to your computer and use it in GitHub Desktop.
val getBookCover: Endpoint[UUID, (StatusCode, ErrorInfo), Source[ByteString, Any],
Source[ByteString, Any]] =
baseEndpoint
.get
.in("books" / path[UUID]("bookId") / "cover")
.out(streamBody[Source[ByteString, Any]](schemaFor[Array[Byte]],
MediaType.OctetStream()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment