APISonar


org.rapidoid.http.MediaType.JSON

> org > rapidoid > http > MediaType > JSON
org APIs rapidoid APIs http APIs MediaType APIs JSON APIs

Example 1
public static void main(String[] args) {
		/* The response type will be JSON, instead of HTML */

		On.get("/").html((Req req) -> {
			Resp resp = req.response();
			resp.contentType(MediaType.JSON);
			resp.result("abc");
			return resp;
		});
	}