Hello everybody,
I am trying to develop an extension, but I found a problem that I don't be able to solve.
In my code I have:
Request request = Request.Post("https://tothewebsite.com");
File f= new File(OBJECT_LOCATION);
request.bodyFile(f,ContentType.MULTIPART_FORM_DATA);
request.setHeader("Content-Type", "image/png");
HttpResponse httpResponse = request.execute().returnResponse();
System.out.println(httpResponse.getStatusLine());
if (httpResponse.getEntity() != null) {
String html = EntityUtils.toString(httpResponse.getEntity());
System.out.println(html);
When I compile I have some errors like cannot find symbols for example on EntityUtils, ContentType and so on.
I tried to solve with these steps:
-
I downloaded unzipped and copied into appinventor\lib\http_5.1.3 the file httpcore5-5.1.3.jar
-
In the folder appinventor\components i opened the file build.xml abd added:
Add extension libraries herecopy toFile="${public.deps.dir}/httpcore5-5.1.3.jar" file="${lib.dir}/http_5.1.3/httpcore5-5.1.3.jar"
-
in the extensions I added before @DesignerComponent:
@UsesLibraries(libraries = "httpcore5-5.1.3.jar")
but I have the same mistakes.
Do you have any tips to solve?
Thank You
Best regards
Marco