I recently asked this question: Question I asked recently
I like the restful way that link is represented BTW. The question was essentially how do I get complex parameters to my REST service? What would the code and parameters of that code look like? Well, the more I thought about it, the more it reminded me of a simple a web form submission. Keep in mind that the clients of this service are going to be native applications. Why can't the client applications assemble the variables in questions into a post request Key-value object (including a byte array-file), bundle that and send it to my service where the appropriate action/response will occur? Pretty sure that Java (RESTEasy is the framework I am using) can handle the request gracefully. Am I crazy or has this already been worked out?
As an example of how this would look does anybody have a sample HTML string that would represent a simple post of a couple of variables, like this?
{
"restriction-type": "boolean-search-restriction",
"boolean-logic": "and",
"restrictions": [
{
"restriction-type": "property-search-restriction",
"property": {
"name": "name",
"type": "STRING"
},
"match-mode": "EXACTLY_MATCHES",
"value": "admin"
},
{
"restriction-type": "property-search-restriction",
"property": {
"name": "email",
"type": "STRING"
},
"match-mode": "EXACTLY_MATCHES",
"value": "admin@example.com"
}
]
}
But with html headers and all??? I got that example from here btw: example JSON post