APISonar


com.javanut.pronghorn.network.config.HTTPContentTypeDefaults.JSON

> com > javanut > pronghorn > network > config > HTTPContentTypeDefaults > JSON
com APIs javanut APIs pronghorn APIs network APIs config APIs HTTPContentTypeDefaults APIs JSON APIs

Example 1
public boolean jsonRestRequest(HTTPRequestReader request) {
	
		//this check is to postpone the work if the network has become saturated
		if (responseService.hasRoomFor(1)) {

			return responseService.publishHTTPResponse(request, 
					                            HTTPContentTypeDefaults.JSON,
					                            w -> renderJSON.render(w,new RequestObject(request))
					                            );
		} else {
			return false;
		}
	}