Re: restful api wish

Hi Kai,

On 25-Jun-08, at 9:21 AM, Kai Hendry wrote:
> An example how I would like to see the CSS validator api to work:
>
> x61:/tmp% cat style.css
> body { colour: green; }
>
> curl -s -F css=@style.css http://jigsaw.w3.org/css-validator
>
> And then your service would return in a line based text format:
>
> style.css:1:8:Property colour doesn't exist :  green
>
> So vim could parse this errorformat easily as
> filename:lineno:colno:error message

You can do something very close to that already. Not much to do with  
RESTfulness, but the CSS validator does have a plain text output and a  
way to pass files, without passing a URI.

Use the text= parameter for your data, use output=text, and make sure  
to use the POST method. I'm sure curl can do this.

http://jigsaw.w3.org/css-validator/manual.html#requestformat

regards,
olivier

Received on Wednesday, 25 June 2008 14:32:05 UTC