4

Im having issues finding tutorial for this subject. Do anyone have an good example. I want to send an JSONObject from a android app over http to node.js. Thanks

user1581164
  • 71
  • 2
  • 5

1 Answers1

4
  1. OK, start by learning about HTTP & REST to decide whether you want to PUT or POST your JSON.

  2. Create a HTTPRequest in your Android app that puts the JSON into the HTTP message's body. See:

Back to node:

  1. Set up a node.js http handler for that type of request. I recommend using express, since it's easy and you'll find the most examples & support when using it.

  2. Use a body parser in express to read the JSON object.

  3. $$$ PROFIT $$$

Community
  • 1
  • 1
rdrey
  • 8,529
  • 3
  • 34
  • 50