Simon, Great thing you like the idea. Some new thoughts below.
On 22 Nov, 11:50, "Simon Laws" <[EMAIL PROTECTED]> wrote: > > Currently the restrpc binding will only return data in XML format. > > Unless anyone has a better suggestion we will be extending our > > installation of phosoa to check the Accept header of the client to > > determine the format of return data. > Sounds like a good idea to me. There is the opportunity in > restrpc/Server.php to convert the response into the required output format > so I think this will work. Using only the Accept header turns out to be impractical when calling the API from a browser based script when not using the XMLHTTPRequest object, since it's then not possible to modify the request header in any way. My suggestion is to, instead of looking at the accept header, or as an override possibility, add an optional parameter after the method name: That would make these calls valid: /MyService.php/myMethod/json?a=b&c=a returns JSON /MyService.php/myMethod/xml?a=b&c=a returns XML /MyService.php/myMethod?a=b&c=a returns XML for backwards compatibility Regards /Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "phpsoa" group. To post to this group, send email to phpsoa@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en -~----------~----~----~----~------~----~------~--~---