When you use REST to create a new entry using a POST, I see some APIs such as Google’s specify that you send XML as part of the request while others specify that you send key/value pairs. Is there a standard or best practice for REST POST-s?
Share
It depends on the REST service implementer.
If the REST service is an adaptation of an existing html HTML form post key value pairs are generally easier to start off with.
When posting information from JavaScript it is usually easier to use JSON.
XML is used often because it is easy for humans to understand and there are heaps of tools in every language/platform that can deal with it.