Results 1 to 2 of 2

Thread: convert Java to vb6.0

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2012
    Posts
    58

    convert Java to vb6.0

    Can someone convert the following code in JAVA to vb6.0 ?

    // Apache HTTP client is used from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
    import java.net.URI;
    import org.apache.http.HttpEntity;
    import org.apache.http.HttpResponse;
    import org.apache.http.client.HttpClient;
    import org.apache.http.client.methods.HttpGet;
    import org.apache.http.client.utils.URIBuilder;
    import org.apache.http.impl.client.HttpClients;
    import org.apache.http.util.EntityUtils;

    public class Java1
    {
    public static void main(String[] args)
    {
    HttpClient httpclient = HttpClients.createDefault();

    try
    {
    URI-1 builder = new URI-1("https://data1-api.net/Request1");

    builder.setParameter("code", "{code}");

    URI uri = builder.build();
    HttpGet request = new HttpGet(uri);
    request.setHeader("ID", "{ID}");
    request.setHeader("Key", "{key}");

    StringEntity reqEntity = new StringEntity("{body}");
    request.setEntity(reqEntity);

    HttpResponse response = httpclient.execute(request);
    HttpEntity entity = response.getEntity();

    if (entity != null)
    {
    System.out.println(EntityUtils.toString(entity));
    }
    }
    catch (Exception e)
    {
    System.out.println(e.getMessage());
    }
    }
    }
    Last edited by dimbil; Mar 14th, 2022 at 02:52 PM.

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,945

    Re: convert Java to vb6.0

    1. I doubt anyone here is going to do all your work for you.
    2. What does your program do?
    3. Please use code tags to enclose code. (the "#" button in the toolbar when posting).
    4. Judging from your code it deals with http: https://www.example-code.com/vb6/http.asp - and the entity framework. I am not sure whether the latter can even be used with vb6.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width