Hi!


I have a simple route, that should respond (as I expect) with 
`application/json` media type. 


 def height: Route = {
   path("height") {
     // 
respondWithHeaders(`Content-Type`(MediaTypes.`application/json`))(complete("???"))
 
// also don't work
     respondWithHeaders(RawHeader("Content-Type", "application/json"))(
complete("???"))
   }
 }


But when I do requests to this route, I see Content-Type: text/plain :


 $ curl -X GET -v 'http://localhost:9085/blocks/height'
* Hostname was NOT found in DNS cache
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9085 (#0)
> GET /blocks/height HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:9085
> Accept: */*
> 
< HTTP/1.1 200 OK
* Server akka-http/2.4.4 is not blacklisted
< Server: akka-http/2.4.4
< Date: Fri, 22 Apr 2016 14:04:18 GMT
< Content-Type: text/plain; charset=UTF-8
< Content-Length: 3
< 
* Connection #0 to host localhost left intact
???


What should I change to get `application/json` media typ&




-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to