Your handler needs to return a valid response map. ie {:status 200 :headers {} :body content}
I'm still not there yet. The browser assumes the user wants to download a file, presumably because the content type is not known.
Even if you set a content type in the headers @cjmurphy ? We explicitly set content types via the headers hash for all of our non-untangled route handlers.
Sorry, I was being a little general. You definitely want to set the content type to “text/html”.
I came across the article today about how CircleCi mounts all their local state in the global app state. Is anyone currently doing this with om next (or is there a simpler solution even)? https://circleci.com/blog/local-state-global-concerns/
@kenbier: sounds like prefixing query fragments with :ui/* in untangled so they dont go to the server
@therabidbanana, @mahinshaw: Thanks guys - but could someone tell me exactly how to set the content type to "text/html" via :headers
. I might try :headers {:content-type "text/html"}
, but it would probably be wrong. (unfortunately I can't try things out as I type here).
:headers {"Content-Type" "text/html”}
is what you want
Thanks @mahinshaw - I'm not an experienced web programmer so need to go from examples.
No problem
@adambros: we do use that in some places. though we want to reset those fields when the component unmounts. i.e. open a modal and enter some text, then submit. next time you open the modal the fields should be some default value, not your last input.
it breaks initial state
i suppose i could remove them in the unmount lifecycle method, but that seems like a bit too much cleanup code to write.