Code example for HttpPost

Methods: abort

    public void abort() { 
        try { 
            if (httpClient != null) {
        } catch (Exception e) {
            System.out.println("Your App Name Here" + e);
    public String sendJSONPost(URI uri, String path, Map<String, String> params) {
    	return sendPost(uri, path, params, "application/json");
    public String sendPost(URI uri, String path, Map<String, String> params, String contentType) {
		Credentials creds = new UsernamePasswordCredentials(params.get("username"), params.get("password"));
		AuthScope authscope = new AuthScope(uri.getHost(), uri.getPort());
		httpClient.getCredentialsProvider().setCredentials(authscope, creds);
Connect your IDE to all the code out there  Get Codota for Java