i\'m trying to use spray detach as following:
path(\"\") {
get {
detach {
respondWithMediaType(`text/html`) { // XML is marshalled to `text/xml` by d
You are looking at a deprecated documentation. If you to want to read the current documentation you have to look at the spray.io website.
Regarding your problem, the current documentation specifies a different signature for the detach
directive - see here
def detach()(implicit ec: ExecutionContext): Directive0
def detach()(implicit refFactory: ActorRefFactory): Directive0
def detach(ec: ExecutionContext): Directive0
As you are passing your ExecutionContext implicitly I guess, you have to write the parenthesis:
detach() {
respondWithMediaType(`text/html`) { // XML is marshalled to `text/xml` by default, so we simply override here
complete { ...