w3c / Unicorn

Unicorn - W3C's Unified Validator
https://validator.w3.org/unicorn/
Other
128 stars 59 forks source link

Webservice #107

Closed vivienlacourba closed 8 years ago

vivienlacourba commented 8 years ago

Reported by anonymous on 29 Jul 2010 15:02 UTC Add an webservice Interface like the Markup validator, to use it inside other Software. Maybe enable the webservice on local installations only.

vivienlacourba commented 8 years ago

Comment by tgambet on 7 Sep 2010 18:18 UTC There is already a web service although it's not documented yet. Add ?ucn_format=xml to any request and you'll get the response in a custom xml format which is documented here: http://code.w3.org/unicorn/wiki/Documentation/Observer/Response

example: http://validator.w3.org/unicorn/check?ucn_uri=www.w3.org&ucn_task=conformance&ucn_format=xml

If we get too many requests on this service we'll consider restricting it to local installations only.

vivienlacourba commented 8 years ago

Comment by anonymous on 8 Sep 2010 07:48 UTC Well that's ok, but for an real webservice usage, we need the posibility to make HTTP-Request to Unicorn. Thats means the Html/CSS/... data are in the post data of the request.

And its ok to restrict it to local usage only, because we use an local copy of the old validator and want to use an local copy of unicorn too.

vivienlacourba commented 8 years ago

Comment by tgambet on 8 Sep 2010 15:12 UTC You can use POST method. The content of the document to check must be in the parameter ucn_text and its mimetype in ucn_text_mime, eg:

ucn_text=table{background-color:#000;} ucn_text_mime=text/css