Jeremiah Senkpiel
Jeremiah Senkpiel
[They already are...](https://docs.rs/tide/0.10.0/tide/http/mime/index.html#constants) That is quite certainly the recommended usage. If that doesn't support your use-case, perhaps try: ```rust res.set_content_type(Mime::from_str("mime/type")?); ```
Ah, true. Having the constants be on the struct feels a little weird but at very least I think the docs from `Mime` should recommend using them.
Should be fixed whenever we pull in an `http-types` 2.4.0...
Related to https://github.com/http-rs/tide/issues/586
@jbr Had a direction idea on this that wasn't posted to the original issue which I personally think is much better and more powerful than `.subdomain()`. It's possible that idea...
It strikes me as odd that `.json` would take a structure but that `.html` would take essentially a string. I'm not really sure what that structure would be either though,...
We should probably look to having a return value of `Result` ~~for either tide 1.0 or 2.0,~~ depending on when [`never`](https://doc.rust-lang.org/std/primitive.never.html) stabilizes, as it is the best answer to this...
I think you can use a param for this? `/:page`?
That's a good point, mounting apps within apps having default middleware issues...
I wouldn't be surprised if this was how the spec worked. In general, you'll have a better time using `var` for variables in the repl.