HttpClient error cannot be resolved for type

here is the snapshot of the code

I try to use the HTTP request and response method, but I get an error

Unable to allow org.apache.commons import

I turned it on httpcore.jar, httpclient.jar, httpmime.jar, but still I get an error.

+4
source share
2 answers

You have imported versions 4.3+ of the libraries, but try to use the old classes public HTTP (version 3?), That is GetMethod.

HttpClientis in the package org.apache.http.client. New Version GetMethod- HttpGet.

Everything is here .

+4
source

You can download the jar file from the link below and import into your project

jar

0

Source: https://habr.com/ru/post/1525811/


All Articles