javax.net.ssl.SSLPeerUnverifiedException:peer未经过身份验证(Apache-coyote / 1.1)

时间:2013-10-22 08:43:38

标签: authentication peer

我想使用Rest API在java程序中创建/修改工作项。 我的服务器是Apache-coyote / 1.1。

 HttpClient client = new DefaultHttpClient();
    JSONObject JSONobj = new JSONObject();
    System.out.println("hello ");
    HttpPost post = new HttpPost("https://");
    post.setHeader("Content-Type", "application/json  ");
    post.setHeader("xyz","abcd");   //userid and password

    StringEntity input = new StringEntity(JSONobj.toString());

    System.out.println("hello ");
    post.setEntity(input);
    System.out.println("hello ");

    HttpResponse response = client.execute(post);

enter image description here

0 个答案:

没有答案