Thanks Etienne, with your curl commands it works fine, I'm very happy with
this little victory.
 Many many thanks.


2009/2/3 Posthumus, Etienne <[email protected]>

>  Alberto,
>
> For playing with the REST API from a command line I would suggest that you
> use curl in stead of wget.
> curl has much better options for specifying things like content-type etc.
>
> Also, a most valuable document is the handout from Yourmediashelf:
>
> http://yourmediashelf.com/reference/fedora/fedora3.0b1/Handout-%20Fedora%203.0%20REST%20API%20(sample%20CURL%20commands).rtf<http://yourmediashelf.com/reference/fedora/fedora3.0b1/Handout-%20Fedora%203.0%20REST%20API%20%28sample%20CURL%20commands%29.rtf>
> Mentioned here:
> http://yourmediashelf.com/blog/2008/02/22/account-of-the-unpacking-fedora-30-workshop/
>
> And a great yell of appreciation to the Mediashelf blogger for the above,
> it is a valuable resource.
>
> Etienne Posthumus
> TU Delft Library   -  Digital Product Development
> t: +31 (0) 15 27 81 949
> m: [email protected]
> skype:  eposthumus
> http://www.library.tudelft.nl/
> Prometheusplein 1, 2628 ZC, Delft, Netherlands
>
>
>
>
>  ------------------------------
> *From:* Alberto Puerta Sales [mailto:[email protected]]
> *Sent:* dinsdag 3 februari 2009 13:53
> *To:* [email protected]
> *Subject:* [Fedora-commons-users] REST API and Unsupported Media Type
>
>
>  Hi all, I'm trying to work with the REST API with wget.
>  All time I try GET HTTP all is right but when I try the HTTP POST, I get
> ERROR 415: Unsupported Media Type.
>  One example:
>  #wget -v --post-data="namespace=Work"
> http://localhost:8080/fedora/objects/Work:25
>
>  and I get:
> --12:18:47--  http://localhost:8080/fedora/objects/Work:25
>            => `Work:25'
> Resolving localhost... 127.0.0.1
> Connecting to localhost|127.0.0.1|:8080... connected.
> HTTP request sent, awaiting response... 415 Unsupported Media Type
> 12:18:47 ERROR 415  Unsupported Media Type.
>
> I also tried Open Poster Firefox Plugin, and the result is the same:
> The server refused this request because the request entity is in a format
> not supported by the requested resource for the requested method ()
>
> Other examples with another functions fail too, I always get an ERROR 415
> I used Fedora 3.1 with Tomcat and I had to add to web.xml:
>     <servlet-mapping>
>       <servlet-name>RestServlet</servlet-name>
>       <url-pattern>/objects/*</url-pattern>
>     </servlet-mapping>
>
> To make REST API work. ¿what I'm doing wrong?
> Thanks.
>
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with
> Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code
> to
> build responsive, highly engaging applications that combine the power of
> local
> resources and data with the reach of the web. Download the Adobe AIR SDK
> and
> Ajax docs to start building applications today-
> http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Fedora-commons-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
>
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Fedora-commons-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to