New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookbook ideas for mime #312

Closed
KodrAus opened this Issue Oct 2, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@KodrAus

KodrAus commented Oct 2, 2017

Come up with ideas for nice introductory examples of using the mime crate, possibly in combination with other crates, that would be good to show in the Rust Cookbook. Please leave a comment here with your ideas! You don't necessarily have to write the example code yourself but PRs are always welcome!

@budziq budziq added this to the impl period milestone Oct 4, 2017

@juli1

This comment has been minimized.

Show comment
Hide comment
@juli1

juli1 Feb 25, 2018

Contributor

One idea would be to use this crate to generate a HTTP response for a HTTP request.
Scenario: we start a server that sends the same HTTP message with the Content-Type set using the mime crate.

Contributor

juli1 commented Feb 25, 2018

One idea would be to use this crate to generate a HTTP response for a HTTP request.
Scenario: we start a server that sends the same HTTP message with the Content-Type set using the mime crate.

@juli1

This comment has been minimized.

Show comment
Hide comment
@juli1

juli1 Feb 25, 2018

Contributor

Another idea is to have a simple function that tries to guess the Mime type according to the file extension. I wrote a program that does this. See https://github.com/juli1/rust-playground/blob/master/src/mime-guess.rs

I am more than happy to add this as a contribution in the cookbook.

Contributor

juli1 commented Feb 25, 2018

Another idea is to have a simple function that tries to guess the Mime type according to the file extension. I wrote a program that does this. See https://github.com/juli1/rust-playground/blob/master/src/mime-guess.rs

I am more than happy to add this as a contribution in the cookbook.

@budziq budziq removed this from the impl period milestone May 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment