-3

I'm a newly in Android programming. My issue is this: I would like to send a JSON request like by Post method from an android app.

The request is this:

{"username": "jde",
 "password": "oracle01",
 "inputs" : 
[ 
  {   "name": "Username", "value": "COCCONIP" },
  {   "name" : "Surname", "value" : "Cocconi" } 
] 
 }

someone could help me ? Regards Paolo

  • 1
    instead of downvote guide him how to send data or post data to the server. – akhilesh0707 Sep 02 '17 at 10:19
  • google for retrofit/okhttp examples – Anton Kazakov Sep 02 '17 at 10:24
  • 2
    Welcome to SO. This site is not a code-writing service and is not meant for delivering complete solutions. Users are expected to show some effort and code whilst SO is here to help you solve specific programming problems along the way. Have you tried anything already? – Maciej Jureczko Sep 02 '17 at 10:37

1 Answers1

0

Are you using HttpClient? Actually Android deprecates HttpClient insted of HttpClient you need to "HttpURLConnection" for POST Request check Here one of the sample : link

That link answers tou your question

Zafar Kurbonov
  • 2,077
  • 4
  • 19
  • 42