Build post.

@param service    the service
@param parameters the parameters
@return the response
962998
protected Response buildPost(final WebApplicationService service, final Map<String, String> parameters) {
        return DefaultResponse.getPostResponse(service.getOriginalUrl(), parameters);
    }
183864
public RestResponse postJson(final String uri, final String params)
            throws IOException, AppPlatformException {
        return requestJson(getPath(uri), HttpPost.METHOD_NAME, params);
    }
41694
protected Http buildHttpPostUserPreAuthRequest(final String username) {
        val usersRequest = new Http(HttpMethod.POST.name(),
            duoProperties.getDuoApiHost(),
            String.format("/auth/v%s/preauth", AUTH_API_VERSION));
        usersRequest.addParam("username", username);
        return usersRequest;
    }
608334
public static HttpResponse executePost(final String url,
                                           final String entity,
                                           final Map<String, Object> parameters) {
        return executePost(url, null, null, entity, parameters);
    }
570809
public HttpRequest buildPostRequest(GenericUrl url, HttpContent content) throws IOException {
    return buildRequest(HttpMethods.POST, url, content);
  }
987807
def createService(self, service):
        
        url = self._url + "/createService"
        params = {
            "f" : "json"
        }
        if isinstance(service, str):
            params['service'] = service
        elif isinstance(service, dict):
            params['service'] = json.dumps(service)
        return self._post(url=url,
                             param_dict=params,
                             securityHandler=self._securityHandler,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)
1133947
private void addPostParams(final Request request) {
        if (code != null) {
            request.addPostParam("Code", code);
        }

        if (to != null) {
            request.addPostParam("To", to);
        }
    }
846641
private static JSONObject doPostRequest(HttpPost httpPost, HashMap<String, String> params) throws JSONException {
    	JSONObject json = null;
        HttpClient postClient = HttpClientBuilder.create().build();
        HttpResponse response;
        
        try {
            response = postClient.execute(httpPost);
            
            if(response.getStatusLine().getStatusCode() == 200) {
                HttpEntity entity = response.getEntity();
                
                if (entity != null) {
                    InputStream instream = entity.getContent();  
                    String result = convertStreamToString(instream);
                    instream.close();
                    
                    json = new JSONObject(result);
                }
            } else {
            	json = UpworkRestClient.genError(response);
            }
        } catch (ClientProtocolException e) {
            json = UpworkRestClient.genError(HTTP_RESPONSE_503, "Exception: ClientProtocolException");
        } catch (IOException e) {
            json = UpworkRestClient.genError(HTTP_RESPONSE_503, "Exception: IOException");
        } catch (JSONException e) {
            json = UpworkRestClient.genError(HTTP_RESPONSE_503, "Exception: JSONException");  
        } catch (Exception e) {
            json = UpworkRestClient.genError(HTTP_RESPONSE_503, "Exception: Exception " + e.toString());
        } finally {
            httpPost.abort();
        }
        
        return json;
    }
372210
private void addPostParams(final Request request) {
        if (read != null) {
            request.addPostParam("Read", read.toString());
        }

        if (write != null) {
            request.addPostParam("Write", write.toString());
        }

        if (manage != null) {
            request.addPostParam("Manage", manage.toString());
        }
    }
594309
public UrlStringBuilder addParameters(String namespace, Map<String, List<String>> parameters) {
        for (final String name : parameters.keySet()) {
            Validate.notNull(name, "parameter map cannot contain any null keys");
        }

        for (final Map.Entry<String, List<String>> newParamEntry : parameters.entrySet()) {
            final String name = newParamEntry.getKey();
            final List<String> values = this.copy(newParamEntry.getValue());

            this.parameters.put(namespace + name, values);
        }
        return this;
    }
404175
public ServerBuilder service(PathMapping pathMapping, Service<HttpRequest, HttpResponse> service) {
        defaultVirtualHostBuilderUpdated();
        defaultVirtualHostBuilder.service(pathMapping, service);
        return this;
    }
916689
protected String build(Response response) {
    StringBuilder sb = new StringBuilder();
    sb.append("<div class='container'>");
    sb.append("<div class='row-fluid'>");
    sb.append("<div class='span12'>");
    sb.append(buildJSONResponseBox(response));
    if( response._status == Response.Status.done ) response.toJava(sb);
    sb.append(buildResponseHeader(response));
    Builder builder = response.getBuilderFor(ROOT_OBJECT);
    if (builder == null) {
      sb.append("<h3>"+name()+"</h3>");
      builder = OBJECT_BUILDER;
    }
    for( String h : response.getHeaders() ) sb.append(h);
    if( response._response==null ) {
      boolean done = response._req.toHTML(sb);
      if(!done) {
        JsonParser parser = new JsonParser();
        String json = new String(response._req.writeJSON(new AutoBuffer()).buf());
        JsonObject o = (JsonObject) parser.parse(json);
        sb.append(builder.build(response, o, ""));
      }
    } else sb.append(builder.build(response,response._response,""));
    sb.append("</div></div></div>");
    return sb.toString();
  }
1207246
protected HttpUriRequest buildMethod(final String method, final String path, final Map<String, Object> params) {
        if (StringUtils.equalsIgnoreCase(method, HttpGet.METHOD_NAME)) {
            return generateGetRequest(path, params);
        } else if (StringUtils.equalsIgnoreCase(method, HttpPost.METHOD_NAME)) {
            return generatePostRequest(path, params);
        } else if (StringUtils.equalsIgnoreCase(method, HttpPut.METHOD_NAME)) {
            return generatePutRequest(path, params);
        } else if (StringUtils.equalsIgnoreCase(method, HttpDelete.METHOD_NAME)) {
            return generateDeleteRequest(path);
        } else {
            throw new RuntimeException("Must not be here.");
        }
    }
748255
public static RequestResponse callHttpPost(HttpJsonRpcClient client, String url,
            Map<String, Object> headers, Map<String, Object> urlParams, Object requestData) {
        return client.doPost(url, headers, urlParams, requestData);
    }
699911
private void addPostParams(final Request request) {
        if (statusCallback != null) {
            request.addPostParam("StatusCallback", statusCallback.toString());
        }

        if (uniqueName != null) {
            request.addPostParam("UniqueName", uniqueName);
        }
    }
838720
public <T> HttpClientRequest.Builder<T> post(final URI uri, final HttpClientResponseHandler<T> httpHandler)
    {
        return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.POST, uri, httpHandler);
    }
866489
@SuppressWarnings("unchecked")
	private Map<String, Object> buildParameters(Object parameters) {
		Map<String, Object> parameterMap = new HashMap<String, Object>();

		if (parameters != null) {
			if (parameters.getClass().isArray()) {
				Object[] paramValues = (Object[]) parameters;
				for (int i = 0; i < paramValues.length; i++) {
					if (paramValues[i] == null) {
						paramValues[i] = "";
					}
					parameterMap.put(Integer.toString(i), paramValues[i]);
				}
			} else if (parameters instanceof Map) {
				parameterMap = (Map<String, Object>) parameters;
			} else {
				Class<? extends Object> paramClass = parameters.getClass();
				Field[] fields = paramClass.getDeclaredFields();
				for (Field field : fields) {
					field.setAccessible(true);

					String fieldName = field.getName();
					Object fieldValue = null;
					try {
						fieldValue = field.get(parameters);
					} catch (Exception e) {
						fieldValue = null;
					}
					if (fieldName != null && fieldValue != null) {
						parameterMap.put(fieldName, fieldValue);
					}
				}
			}
		}

		return parameterMap;
	}