private HttpURLConnection processRequest(CallReport callReport, Request request, int count) throws MalformedURLException, IOException {
		println("REQUEST:");

		if (AzotConfig.GLOBAL.DEBUG) {
			final List<Variable> contextVariables = workflow.getContext().getVariables();
			for (final Variable variable : contextVariables) {
				println(" variable:"  + variable.getId() + " = " + variable.getValue());
			}
			println();
		}

		final String method = request.getMethod();
		final String url = getExpandedUrl(request);


		println("[" + method +"] " + url);
		println();

		callReport.setUrl(url);

		/* Contents */
		final List<Content> contents = getExpandedContents(request);

		/* External Contents */
		final List<ExternalContent> externalContents = getExpandedExternalContents(request);

		/* Headers */
		final List<Header> headers = getExpandedHeaders(request);

		// Request handling
		HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
		connection.setRequestMethod(method);

		for (final Header header : headers) {
			connection.setRequestProperty(header.getName(), header.getValue());
		}

		dumpFile(workflowReport, count, contents, externalContents);

		connection.setDoOutput(true);

		// Multi part
		if(isMultipart(headers)) {

			final DataOutputStream out = new DataOutputStream(connection.getOutputStream());

			//Write the http request content
			for (final Content content : contents) {

				out.writeBytes("\n--" + BOUNDARY + "\r\n");
				out.writeBytes("Content-Disposition: form-data; name=\"" + content.getName() + "\"\r\n");
				out.writeBytes("Content-Type: " + content.getType() + " \n\n");
				out.write(content.getValue().getBytes(Charset.forName("UTF8")));

			}

			for (final ExternalContent eContent : externalContents) {

				File file = new File(eContent.getFilename());

				out.writeBytes("\n--" + BOUNDARY + "\r\n");
				out.writeBytes("Content-Disposition: form-data; name=\"" + eContent.getName() + "\"; filename=\"" + file.getName() + "\"\r\n");
				out.writeBytes("Content-Type: " + eContent.getType() + " \n\n");
				out.write(getFileContent(file));

			}

			out.writeBytes("\n--" + BOUNDARY + "\r\n");
			out.flush();
			out.close();
		} else {
			// Single Part
			String singleContent = null;

			if (request.getContents().size() > 0) {
				singleContent = request.getContents().get(0).getValue();
			}

			if (singleContent != null) {

				final String contentLenght = String.valueOf(singleContent.getBytes().length);
				connection.setRequestProperty("Content-Length", contentLenght);

				println(" header: "  + "Content-Length" + " = " + contentLenght);

				final DataOutputStream out = new DataOutputStream(connection.getOutputStream());
				out.write(singleContent.getBytes(Charset.forName("UTF8")));
				out.flush();
				out.close();
			}
		}
		
		return connection;
	}