Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - HttpPost, posting Array via Multiple entity

HttpPost, posting Array via Multiple entity

Put your problem here if it does not fit any of the other categories.

HttpPost, posting Array via Multiple entity

Postby flagantz » Mon Feb 14, 2011 10:49 am

this is my code

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. HttpClient client = new DefaultHttpClient();  
  3. String postURL = "http://blablabla.com;
  4. HttpPost post = new HttpPost(postURL);
  5.    
  6. String[] my_users = {
  7.                         "User1", "User2", "User3"
  8.                 };
  9.  
  10. MultipartEntity reqEntity = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);  
  11. try {
  12.         reqEntity.addPart("_id", new StringBody("Test"));
  13.         reqEntity.addPart("_users", new StringBody(my_users));
  14. } catch (UnsupportedEncodingException e1) {
  15.         Log.e("Error", "UnsupportedEncodingException");
  16.         e1.printStackTrace();
  17. }
  18. post.setEntity(reqEntity);     
  19. HttpResponse response = client.execute(post);  
  20. HttpEntity resEntity = response.getEntity();
Parsed in 0.014 seconds, using GeSHi 1.0.8.4


it's error on the reqEntity.addPart("_users", new StringBody(my_users)); part bcause my_users is array

i've googling and found nothing, can someone help me on this problem plz..

thanks
flagantz
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Feb 14, 2011 10:36 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests