Как отправить массив String в виде пары базовых имен в виде HTTPPOST?

Я хочу отправить массив в виде пары имя-значение, поскольку httppost. Мой сервер принимает только значения массива. Ниже приведен мой фрагмент кода ..

public String SearchWithType(String category_name, String[] type,int page_no) {

    String url = "http://myURL";
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder()
            .permitAll().build();
    StrictMode.setThreadPolicy(policy);

    String auth_token = Login.authentication_token;
    String key = Login.key;

    HttpClient httpclient = new DefaultHttpClient();
    HttpPost httppost = new HttpPost(url);

    try {
        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
        nameValuePairs.add(new BasicNameValuePair("authentication_token",
                auth_token));
        nameValuePairs.add(new BasicNameValuePair("key", key));
        nameValuePairs.add(new BasicNameValuePair("category_name",
                category_name));
        int i = 0;
        nameValuePairs.add(new BasicNameValuePair("type", type[i]));
        nameValuePairs.add(new BasicNameValuePair("page", String.valueOf(page_no)));

        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        HttpResponse response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        eu = EntityUtils.toString(entity).toString();

    } catch (IOException ioe) {
        String ex = ioe.toString();
        return ex;
    }

    return eu;
} 

Ответы на вопрос(4)

Ваш ответ на вопрос