java - The method getHostConfiguration() is undefined for the type HttpClient -
trying twilio working proxy get:
the method gethostconfiguration() undefined type httpclient
in following code:
twiliorestclient client = new twiliorestclient(accountsid, authtoken); client.gethttpclient().gethostconfiguration().setproxy("1.1.1.1", "8080");
the imports have are:
import java.io.ioexception; import org.apache.commons.httpclient.credentials; import org.apache.commons.httpclient.hostconfiguration; import org.apache.commons.httpclient.httpclient; import org.apache.commons.httpclient.httpmethod; import org.apache.commons.httpclient.httpstatus; import org.apache.commons.httpclient.usernamepasswordcredentials; import org.apache.commons.httpclient.auth.authscope; import org.apache.commons.httpclient.methods.getmethod; import org.apache.http.httpresponse; import org.apache.http.client.methods.httpget; import org.apache.http.impl.client.closeablehttpclient; import org.apache.http.impl.client.httpclientbuilder; import java.io.unsupportedencodingexception; import java.util.properties; import javax.mail.message; import javax.mail.messagingexception; import javax.mail.passwordauthentication; import javax.mail.session; import javax.mail.transport; import javax.mail.internet.addressexception; import javax.mail.internet.internetaddress; import javax.mail.internet.mimemessage; import java.util.hashmap; import java.util.map; import com.twilio.sdk.twiliorestclient; import com.twilio.sdk.twiliorestexception; import com.twilio.sdk.twiliorestresponse; import com.twilio.sdk.resource.factory.smsfactory; import com.twilio.sdk.resource.instance.account; import com.twilio.sdk.resource.instance.sms;
Comments
Post a Comment