Search code examples
javafile-uploadjax-rsapache-wink

Error 415 (Unsupported Media Type) while uploading with wink


I have a project which uses wink. It has several methods which use post/get and everything works fine except method which consumes application/octet-stream with POST. Calling this method causes error 415. It looks to me that it is jar or configuration issue. What can be checked to eliminate configuration/jar conflict?


Solution

  • 415 mean unsupported media type. Since you say that you have annotated the method with @Consumes("application/octet-stream"), I assume that you send a different media type. Usually the file upload uses a multipart media type.

    I suggest that you sniff the traffic (Fiddler is a really nice tool to do it) and see the real media type on the request.