Initializes a POST request to the given URL.

@param url String url
@return HttpClient
@throws HelloSignException thrown if the url is invalid
497775
public HttpClient post(String url) throws HelloSignException {
        if (getParams != null) {
            logger.warn("GET parameters set for a POST request, they will be ignored");
        }
        request = new HttpPostRequest(url, postFields, auth);
        request.execute();
        return this;
    }
227951
public function init(String $url = NULL) : CURL
    {
        if( $url !== NULL && ! IS::URL($url) )
        {
            $url = Request::getSiteURL($url);
        }

        $this->init = curl_init($url);

        return $this;
    }
733504
protected HttpURLConnection createHttpURLConnection(final String url) throws IOException {

    URL sendUrl = new URL(url);

    HttpURLConnection con;

    if (StringUtils.isNotBlank(proxyHost) && proxyPort != null) {

      Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort));
      con = (HttpURLConnection) sendUrl.openConnection(proxy);
      if (StringUtils.isNotBlank(proxyUsername)) {
        String passwd = proxyPassword != null ? proxyPassword : "";
        String authValue = proxyUsername + ":" + passwd;
        String headerValue = Base64.encodeBase64String(authValue.getBytes(
            StandardCharsets.UTF_8));
        con.setRequestProperty("Proxy-Authorization", "Basic " + headerValue);
      }

    } else {

      con = (HttpURLConnection) sendUrl.openConnection();
    }

    try {
      if (url.toLowerCase().startsWith("https")) {
        HttpsURLConnection secCon = (HttpsURLConnection) con;
        secCon.setHostnameVerifier(createAllHostnamesVerifier());
        SSLContext sc = SSLContext.getInstance("TLS");
        sc.init(null, createTrustAllManagers(), new SecureRandom());
        secCon.setSSLSocketFactory(sc.getSocketFactory());
      }

    } catch (NoSuchAlgorithmException | KeyManagementException e) {
      throw new IOException(e);
    }

    return con;
  }
483038
@Override
  public void init(String siteurl, String scriptpath) throws Exception {
    ApacheHttpClientConfig config = new DefaultApacheHttpClientConfig();
    config.getProperties().put(ApacheHttpClientConfig.PROPERTY_HANDLE_COOKIES,
        true);
    client = ApacheHttpClient.create(config);
    client.setFollowRedirects(true);
    // org.apache.log4j.Logger.getLogger("httpclient").setLevel(Level.ERROR);
    this.siteurl = siteurl;
    this.scriptPath = scriptpath;
  }
308129
private HttpGet prepareGet(final String url) {
    final HttpGet httpGet = new HttpGet(this.instanceUrl + url);
    for (final Header header : this.headers) {
      httpGet.addHeader(header);
    }
    return httpGet;
  }
664139
public function initUrl($url, $username = null, $password = null, $userAgent = null)
    {
        if (!is_null($username) && !is_null($password)) {
            $this->httpBasicAuth['username'] = $username;
            $this->httpBasicAuth['password'] = $password;
        }

        if (!is_null($userAgent)) {
            $this->httpUserAgent = $userAgent;
        }

        $this->initFile($url);

        return $this;
    }
867024
public static String post(String url, Map<String, String> queryParas, byte[] data, Map<String, String> headers) {
		return HttpKit.post(url, queryParas, (new String(data)), headers);
	}
749
protected function init($url, $postString, $headers)
    {
        $this->headers = $headers;

        $this->curl = curl_init($url);

        if (empty($this->cookieJar)) {
            $this->loadCookies();
        }

        curl_setopt_array($this->curl, $this->makeHttpOptions($postString));

        return $this;
    }
869217
function httpClient(baseUrl, globalTrackingId) {
  var self = object.create(httpClient.prototype);

  self.baseUrl = baseUrl;
  self.globalTrackingId = globalTrackingId;

  return self;
}
491639
public HttpClient options(String url) throws HelloSignException {
        request = new HttpOptionsRequest(url);
        request.execute();
        return this;
    }
24375
public function setUrl(string $url): RequestContext
    {
        $this->assertValidUrl($url);

        $this->url = $url;

        return $this;
    }
515404
public RequestResponse doPost(String url, Map<String, Object> headers,
            Map<String, Object> urlParams, Object requestData) {
        RequestResponse rr = initRequestResponse("POST", url, headers, urlParams, requestData);
        Request.Builder requestBuilder = buildRequest(url, headers, urlParams)
                .post(buildRequestBody(rr));
        return doCall(client, requestBuilder.build(), rr);
    }
863966
public HttpClient delete(String url) throws HelloSignException {
        request = new HttpDeleteRequest(url, auth);
        request.execute();
        return this;
    }
1117601
public static URL correct(final URL url) throws MalformedURLException {
        if (url == null) {
            throw new MalformedURLException("The url is null");
        }
        return new URL(correct(url.toString(), false));
    }
35015
public SignatureRequest sendTemplateSignatureRequest(TemplateSignatureRequest req) throws HelloSignException {
        return new SignatureRequest(httpClient.withAuth(auth).withPostFields(req.getPostFields())
                .post(BASE_URI + TEMPLATE_SIGNATURE_REQUEST_URI).asJson());
    }
789429
public HttpClient get(String url) throws HelloSignException {
        if (postFields != null) {
            logger.warn("POST fields set for a GET request, they will be ignored");
        }
        request = new HttpGetRequest(url, getParams, auth);
        request.execute();
        return this;
    }
335284
function requestUrl(url, callback) {
  var req = new XMLHttpRequest();
  req.addEventListener("load", function () {
    callback(req.responseText);
  });
  req.open("GET", url);
  req.send();
}