Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Http-Header Field Constant Values

Tags:

java

I can't seem to find the static final String values for Http-Headers values. There is e.g. javax.ws.rs.core.MediaType but it does not define values for example like image/jpg etc.

Would I have to make my own constants or did I just not find the right container yet?

like image 884
Stefan Falk Avatar asked May 26 '26 13:05

Stefan Falk


2 Answers

Guava has a MediaType class with a significantly larger number of media types defined.

like image 115
Brett Okken Avatar answered May 30 '26 08:05

Brett Okken


  • Guava lib provides HttpHeaders class
  • If your server runs under a Java EE implementation, you can also use provided HttpHeaders class
like image 31
Damien C Avatar answered May 30 '26 07:05

Damien C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!