Hi Alex,
Thank you for your reply. I have tried to put application/xml in the
request header but it does not work for me. This is how the code looks like:

CURL *curl;struct curl_slist *headers=NULL; // init to NULL is important
curl_slist_append(headers, "Accept: application/xml");
curl_slist_append( headers, "Content-Type: application/xml");
curl_slist_append( headers, "charsets: utf-8");
curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_HTTPGET,1);
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_write);
curl_easy_perform(curl);
curl_slist_free_all(headers);
curl_easy_cleanup(curl);


Thank you

Regards
Olivier



2014-05-17 17:29 GMT+02:00 Alex Olieman <[email protected]>:

>  Hi Olivier,
>
> Sure, you can ask for a response format by setting the corresponding
> accept header. E.g. for XML you would include Accept: application/xml or
> for JSON Accept: application/json in the request headers.
>
> Best,
> Alex
>
> On 17-5-2014 14:38, Olivier Austina wrote:
>
>  Hi
>  Is there a way to specify the annotation format ( in XML for example). I
> am querying the French endpoint as a web service:
>
> French - http://spotlight.sztaki.hu:2225/rest
>
>  but I got result in format in HTML.
>
>  Thank you.
>
>   Regards
> Olivier
>
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for 
> free."http://p.sf.net/sfu/SauceLabs
>
>
>
> _______________________________________________
> Dbp-spotlight-users mailing 
> [email protected]https://lists.sourceforge.net/lists/listinfo/dbp-spotlight-users
>
>
>
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Dbp-spotlight-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dbp-spotlight-users

Reply via email to