}
if (path != null) url = url + "/" + path;
if (fragment != null) url = url + ";" + fragment;
if (query != null) url = url + "?" + query;
request.setURL(new HttpUrl(url));
if (cookie != null) request.addHeader("Cookie", cookie);
if (content != null) {
request.setHeader("Content-Length", Integer.toString(content.size()));
request.setContent(content.toByteArray());
} else if (request.getMethod().equals("POST")) {
request.setHeader("Content-Length", "0");