+htc,java #18600 Add missing convenience ContentTypes class
This commit is contained in:
parent
239b4ca268
commit
2f2e07666e
4 changed files with 25 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue