So I have never used HTTP post before and I need to send a response and receive a response from the same. Here is the documentation I am provided:
EDIT: This code sample comes from Microsoft Azure Machine Learning and I have to integrate into my Android app to do data prediction.
URL
https://**api-version=2.0&details=true
Request
"Inputs": {
"input1": {
"ColumnNames": [
"Light",
"Proximity",
"Ax",
"Ay",
"Az",
"Gx",
"Gy",
"Gz"
],
"Values": [
[
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
],
[
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
]
]
}
},
"GlobalParameters": {}
}
Sample Response
{
"Results": {
"output1": {
"type": "DataTable",
"value": {
"ColumnNames": [
"Scored Probabilities for Class \"BackPocket\"",
"Scored Probabilities for Class \"Ear\"",
"Scored Probabilities for Class \"Handbag\"",
"Scored Probabilities for Class \"SidePocket\"",
"Scored Labels"
],
"ColumnTypes": [
"Numeric",
"Numeric",
"Numeric",
"Numeric",
"Categorical"
],
"Values": [
[
"0",
"0",
"0",
"0",
"BackPocket"
],
[
"0",
"0",
"0",
"0",
"BackPocket"
]
]
}
}
}
}
How can I send this Post Request in Java/Android and then process the response?
I am totally new to this hence I have no idea. I did search about HTTP POST etc. but couldn't find enough on sending and receiving responses. Any library suggestion is also much appreciated.
Thanks.