akka/akka-http

Clarify directive complete reponse body rendering

Open

#1,303 opened on Jul 25, 2017

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Scala (598 forks)batch import
1 - triagedhelp wantedt:docst:http:server:dsl

Repository metrics

Stars
 (1,311 stars)
PR merge metrics
 (Avg merge 1d 10h) (2 merged PRs in 30d)

Description

Issue by matheuslima Thursday Aug 11, 2016 at 00:18 GMT Originally opened as https://github.com/akka/akka/issues/21177


Actually, if we call complete passing only StatusCode as parameter, the reponse will have the StatusCode.toString as body. This is not documented. For example:

complete(StatusCodes.OK)

will render a response with status code 200 and body "OK"

Contributor guide