Fork me on GitHub
#untangled
<
2016-08-09
>
mahinshaw00:08:36

Your handler needs to return a valid response map. ie {:status 200 :headers {} :body content}

cjmurphy07:08:23

I'm still not there yet. The browser assumes the user wants to download a file, presumably because the content type is not known.

therabidbanana14:08:21

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.

mahinshaw15:08:26

Sorry, I was being a little general. You definitely want to set the content type to “text/html”.

kenbier18:08:10

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/

adambrosio20:08:49

@kenbier: sounds like prefixing query fragments with :ui/* in untangled so they dont go to the server

cjmurphy22:08:08

@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).

mahinshaw22:08:43

:headers {"Content-Type" "text/html”} is what you want

cjmurphy22:08:40

Thanks @mahinshaw - I'm not an experienced web programmer so need to go from examples.

kenbier22:08:14

@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.

kenbier22:08:46

it breaks initial state

kenbier22:08:44

i suppose i could remove them in the unmount lifecycle method, but that seems like a bit too much cleanup code to write.