code: private HttpJsonRequest createJsonRequest(String endpoint, JSONObject json, HttpRequestMethod method) {
  		if (endpoint == null) {
  			throw new IllegalArgumentException("Endpoint is null");
  		}
  		if (json == null) {
  			throw new IllegalArgumentException("Json is null");
  		}
  		if (method == null) {
  			throw new IllegalArgumentException("Method is null");
  		}
  
  		String url = createEndpointURL(endpoint);
  		HttpJsonRequest request = new HttpJsonRequest(url, json);
  		setupRequestDefaults(request);
  		request.setMethod(method);
  		request.setRequestProperty("Content-Type", "application/json");
  		return request;
  	}
docs: region Helpers