Right now all service arguments are displayed in the browser using a one-line text field. It would be better if, when the argument type is an array or object, this was changed to be a textarea so that the argument could be pasted in and submitted through the browser.

Comments

gdd’s picture

Status: Active » Needs review
StatusFileSize
new1.12 KB

OK the attached patch does two things

- If the arg type is text, struct, or array, then it offers a textarea instead of a one line textbox
- If the arg type is struct or array, you can paste a serialized object/array into this textarea, and it will be unserialized and processed as if submitted normally

This will make testing of services that have array or struct arguments (like node.save) MUCH easier.

Hugo Wetterberg’s picture

StatusFileSize
new3.54 KB

This patch takes the concept of a proper argument parser a bit further, and lets the user choose between the formats "Comma delimited", "JSON" and "Serialized PHP" where applicable.

Hugo Wetterberg’s picture

StatusFileSize
new46.05 KB
marcingy’s picture

Status: Needs review » Needs work

Marked as needs work as a hand book page on how to construction JSON and PHP for usage in the browser would be nice. Patch has been committed and this should be marked as fixed once the handbook page is created.

Hugo Wetterberg’s picture

Status: Needs work » Fixed

Thanks for the quick footwork yesterday Marc.
Heres the handbook page: http://drupal.org/node/467786

marcingy’s picture

Status: Fixed » Closed (fixed)