You need to set the Accept HTTP header to tell the REST API which format
you want. From the command line you can do it like this:

$ curl -s -H "Accept: application/xml"
http://localhost:8080/rest/communities

I'm not familiar with the DSpace module for Drupal though, so I'm not sure
if it allows you to configure request headers...

Alan

On Thu, Jun 11, 2015 at 1:11 PM, Hicham Zahnan <h...@aub.edu.lb> wrote:

> Hi,
>
>
>
> I’m using a Drupal Module called DSpace, that requires a REST URL to
> return XML.
>
> My problem is when I use the REST URL i.e. (
> www.abcd.com/rest/communities/6/items), into a browser I sometimes get
> JSON or XML, depending on the browser. Because its returning a JSON, its
> causing the module not to work. So is there a way to only get XML through
> http REST request?
>
>
>
> We are using DSpace 5.2
>
>
>
> Thank you,
>
> Hicham
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>



-- 
Alan Orth
alan.o...@gmail.com
https://alaninkenya.org
https://mjanja.ch
"In heaven all the interesting people are missing." -Friedrich Nietzsche
GPG public key ID: 0x8cb0d0acb5cd81ec209c6cdfbd1a0e09c2f836c0
------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to