# How to return a response with custom headers in Mux.jl?

**URL:** https://discourse.julialang.org/t/how-to-return-a-response-with-custom-headers-in-mux-jl/1361
**Category:** General Usage
**Tags:** mux
**Created:** [January 9, 2017, 12:13am UTC](https://discourse.julialang.org/t/how-to-return-a-response-with-custom-headers-in-mux-jl/1361 "2017-01-09T00:13:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![amellnik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amellnik/32/137_2.png) [@amellnik](https://discourse.julialang.org/u/amellnik)
#### Post date: [January 9, 2017, 12:13am UTC](https://discourse.julialang.org/t/how-to-return-a-response-with-custom-headers-in-mux-jl/1361/1 "2017-01-09T00:13:37Z")

</div>

Has anyone been able to get this working? I can do it with HttpServer, but I can’t figure out how to return them in Mux. For example

```julia
@app test = (
    Mux.defaults,
    page("/test", req -> Dict("body"=>"meh")),
    Mux.notfound()
)

```

returns an default response with no body no matter what the Dict is set to. I think the problem might be [here](https://github.com/JuliaWeb/Mux.jl/blob/0d146ca9f0c7374734d620a925ff09829648e081/src/basics.jl#L44) but I’m having a hard time following the code.

---

<div class="post-metadata">

### Author: ![amellnik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amellnik/32/137_2.png) [@amellnik](https://discourse.julialang.org/u/amellnik)
#### Post date: [January 9, 2017, 12:50am UTC](https://discourse.julialang.org/t/how-to-return-a-response-with-custom-headers-in-mux-jl/1361/2 "2017-01-09T00:50:35Z")

</div>

@blairn provided a solution [here](https://github.com/JuliaWeb/Mux.jl/issues/28).
