Makes POST request to given URL

@param url     url
@param body    request body to post or null to skip
@return Response object with HTTP response code and response as String
@throws HttpException in case of invalid input parameters
967673
public static Response post(String url, String body) throws HttpException {

		return post(url, body, null, null, DEFAULT_CONNECT_TIMEOUT, DEFAULT_READ_TIMEOUT);
	}
682246
public function post($url, $requestBody = null) {
        $posturl = $this->url . $url;
        return $this->restRequest($posturl, 'POST', $requestBody);
    }
943348
public static String post(String url, String body, Boolean isJson) {
        ExceptionUtil.notNull(url);
        return post(url, null, null, null, body, isJson);
    }
1337586
public static Request create(String method,
                               String url,
                               Map<String, Collection<String>> headers,
                               byte[] body,
                               Charset charset) {
    checkNotNull(method, "httpMethod of %s", method);
    HttpMethod httpMethod = HttpMethod.valueOf(method.toUpperCase());
    return create(httpMethod, url, headers, body, charset);
  }
1020596
private Map<String, String> executeRequestWithBody(HttpClientService csHttpClient, HttpClientInputs httpClientInputs, String body) {
        httpClientInputs.setBody(body);
        Map<String, String> requestResponse = csHttpClient.execute(httpClientInputs);
        if (UNAUTHORIZED_STATUS_CODE.equals(requestResponse.get(STATUS_CODE))) {
            throw new RuntimeException(UNAUTHORIZED_EXCEPTION_MESSAGE);
        }
        return requestResponse;
    }
958160
protected BaseResponse executePost(String url, String json) {
        return executePost(url, json, null);
    }
823784
public static String get(String url, String body) {
        return request(HttpRequest.get(replaceLocalHost(url)), body).body();
    }
1345239
public static String put(String url, Map<String, String> body) {
        return put(url, JSONObject.toJSONString(body));
    }
758047
public static Response get(String url) throws URISyntaxException, HttpException {
        return send(new HttpGet(url), null, null);
    }
984481
public static HttpResponse postJson(String urlStr, String body) throws IOException, ServiceException {

        URL url = new URL(urlStr);
        HttpURLConnection urlConnection = (HttpURLConnection) url
                .openConnection();
        if (urlConnection instanceof HttpsURLConnection) {
            setTLSConnection((HttpsURLConnection)urlConnection);
        }
        urlConnection.addRequestProperty("Accept", "application/json");

        urlConnection.setRequestMethod("POST");

        urlConnection.addRequestProperty("Content-Type", "application/json");
        urlConnection.addRequestProperty("Content-Length",
                Integer.toString(body.length()));
        urlConnection.setDoOutput(true);
        urlConnection.setDoInput(true);
        urlConnection.setUseCaches(false);

        OutputStream out = urlConnection.getOutputStream();
        out.write(body.getBytes());
        ByteStreams.copy(new ByteArrayInputStream(body.getBytes()), out);
        return getHttpResponse(urlConnection);
    }
37170
public RFuture<String> post(String url, String data) {
    return req(url).setPayload(data).execute().map(GET_PAYLOAD);
  }
64196
public <T> T getObject(
                    final String url,
                    final Class<T> response_type,
                    final Object... uri_variables
                    )
    {
        _LOG_.debug( "HTTP GET: URL=" + url
                        + ", response type=" + response_type
                        + ", variables=" + Arrays.toString( uri_variables ) );

        HttpHeaders  request_headers = new HttpHeaders();
        request_headers.setContentType( getObjectMediaType() );
        HttpEntity<?> request_entity = new HttpEntity<Void>( request_headers );

        HttpEntity<T>  response = null;
        try {
            response = _newRestTemplate().exchange( url, HttpMethod.GET,
                            request_entity, response_type, uri_variables );
            //throws RestClientException
        } catch (Exception ex) {
            throw new HttpException( ex );
        }

        T  body = response.getBody();

        return body;
    }
231125
private HttpUriRequest makeRequest(URI uri, final String requestBody)
    {
        HttpUriRequest request;
        if (m_method == HttpMethod.GET) {
            request = new HttpGet(uri + "?" + requestBody);
        } else if (m_method == HttpMethod.POST) {
            if (m_isHdfs) {
                try {
                    uri = HDFSUtils.opAdder(uri, "APPEND");
                } catch (IllegalArgumentException e) {
                    rateLimitedLogError(m_logger, "Invalid URI %s %s", uri.toString(), Throwables.getStackTraceAsString(e));
                    return null;
                }
            }
            final HttpPost post = new HttpPost(uri);
            post.setEntity(new StringEntity(requestBody, m_contentType));
            request = post;

        } else if (m_method == HttpMethod.PUT) {
            final HttpPut put = new HttpPut(uri);
            put.setEntity(new StringEntity(requestBody, m_contentType));
            request = put;
        } else {
            // Should never reach here
            request = null;
        }

        if (m_isHdfs && request != null) {
            request.setHeader("Expect", "100-continue");
        }

        return request;
    }
1162926
private HttpPost preparePost(final String url) {
    final HttpPost httpPost = new HttpPost(this.instanceUrl + url);
    for (final Header header : this.headers) {
      httpPost.addHeader(header);
    }
    return httpPost;
  }
547344
def post(self, url, body=None):
        
        response = self.http.post(url,
                                  headers=self.headers,
                                  data=body,
                                  **self.requests_params)

        return self.process(response)
1312516
public function post($url, $body = [], $headers = [], $options = [])
    {
        return $this->request('POST', $url, $body, $headers, $options);
    }
136416
async function post(url, body) {
  try {
    const response = await fetch(url, {
      method: 'POST',
      body: JSON.stringify(body),
    });

    wappalyzer.log(`POST ${url}: ${response.status}`, 'driver');
  } catch (error) {
    wappalyzer.log(`POST ${url}: ${error}`, 'driver', 'error');
  }
}