Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6657341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:45:21+00:00 2026-05-26T01:45:21+00:00

I want to convert from array into get-parameters of URL. I know HTTPClient of

  • 0

I want to convert from array into get-parameters of URL.
I know HTTPClient of apache, but it’s too large for applet.

is there simple solution?

I have a List(or array) in my applet, and I want to write URL-parameters for HttpRequest.
ParameterFormatter is good, but the jar file is too large for applet.

edit:
I found there is Java Optimizer/Shrinker/Reducer tool allows you to optimize jar. eg proguard

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:45:22+00:00Added an answer on May 26, 2026 at 1:45 am

    You could simply develop one yourself as you only need to join them together to a query string. I’m doing some assumptions on what you want (such as the key for each variable starts with var) but here goes:

    public String buildUrl(String baseUrl, String[] getVars) {
    
        String url = baseUrl + "?";
        // Builds: http://mydomain.com/app?
    
        for (int i = 0; i < getVars.length; i++) {
    
            url += "var" + i + "=" + getVars[i];
            // Builds the query string, ...app?var1=lol
    
            if (i < getVars.length - 1) {
    
                url += "&";
                // Adds the & after each var except for the last one
                // ...app?var1=lol&
            }
    
            // repeat for each var until done
            // ... app?var1=lol&var2=cat
        }
    
        return url;
    
    }
    

    There are of course other naïve implementations and optimizations to the code that you can do. There also might be some Java class that does this already, but it seems that you have to build it on your own or use the Apache Commons 3rd party library (which I understand you can’t).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know if it is safe/advisable to convert from ArrayList to Array?
I'm trying to convert data from one text input (form) into an array so
I have a numpy array and want to convert it into an ITK image
I want to convert from char representing a hexadecimal value (in upper or lower
My scenario should be simple... the type I want to convert FROM is ALWAYS
I want to convert a code from perl to c++, and my problem is
i want to convert flv video(downloaded from you tube) to any other format, i
I'm reading from a binary file and want to convert the bytes to US
We at the company want to convert all the sites we are hosting from
I have UTF-8 encoded NSData from windows server and I want to convert it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.