unirest

how to make Unirest(java) ignore certificate error

时光总嘲笑我的痴心妄想 提交于 2019-12-03 03:39:46
I am using Unirest (java version) to make GET and POST request.But I encounter a problem when accessing SSL encrypted site , since my program is behind a corporate network and the network admin setup a firewall mapping for me. For example foobar.com is mapped to 56.1.89.12:4444 . But when I make request to the address, I will received the following ssl certificate error: com.mashape.unirest.http.exceptions.UnirestException: javax.net.ssl.SSLException: hostname in certificate didn't match: <56.1.89.12> != <www.foobar.com> at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper

Problems using unirest in Android Studio

半腔热情 提交于 2019-11-28 10:30:45
I have been getting some errors in my logcat that crash my application while trying to execute some unirest requests. I know you have to generate a special unirest jar with all the dependencies but I have had problems with maven and did not do this, instead I have included the dependencies separate in the libs folder. I have narrowed the problem down to this single error below. Logcat: java.lang.VerifyError: com/mashape/unirest/http/options/Options at com.mashape.unirest.http.HttpClientHelper.prepareRequest(HttpClientHelper.java:154) at com.mashape.unirest.http.HttpClientHelper.request

java.lang.NoSuchFieldError: org.apache.http.message.BasicLineFormatter.INSTANCE from Mashape Unirest in Java application

此生再无相见时 提交于 2019-11-27 06:40:59
I have a Maven Java project that uses Mashape Unirest for sending HTTP requests to other URLs. I am currently writing an integration test (using TestNG ) that sends a normal HTTP request using Unirest. When I run the integration test through Maven (via the Failsafe plugin), the request is sent out successfully. However, when I try to run the integration test via Eclipse, I keep on getting the following error: FAILED: getCurrentTimeTest java.lang.NoSuchFieldError: INSTANCE at org.apache.http.impl.io.DefaultHttpRequestWriterFactory.<init>(DefaultHttpRequestWriterFactory.java:52) at org.apache

java.lang.NoSuchFieldError: org.apache.http.message.BasicLineFormatter.INSTANCE from Mashape Unirest in Java application

末鹿安然 提交于 2019-11-26 10:27:01
问题 I have a Maven Java project that uses Mashape Unirest for sending HTTP requests to other URLs. I am currently writing an integration test (using TestNG ) that sends a normal HTTP request using Unirest. When I run the integration test through Maven (via the Failsafe plugin), the request is sent out successfully. However, when I try to run the integration test via Eclipse, I keep on getting the following error: FAILED: getCurrentTimeTest java.lang.NoSuchFieldError: INSTANCE at org.apache.http