+htc,java #18600 Add missing convenience ContentTypes class

This commit is contained in:
Konrad Malawski 2015-09-29 20:58:47 +02:00
parent 239b4ca268
commit 2f2e07666e
4 changed files with 25 additions and 2 deletions

View file

@ -72,7 +72,7 @@ public class HttpServerExampleDocTest {
if (uri.path().equals("/"))
return
HttpResponse.create()
.withEntity(MediaTypes.TEXT_HTML.toContentType(),
.withEntity(ContentTypes.TEXT_HTML,
"<html><body>Hello world!</body></html>");
else if (uri.path().equals("/hello")) {
String name = Util.getOrElse(uri.parameter("name"), "Mister X");