Hi, I am trying to install an extension module to the REST API. After http://docs.marklogic.com/guide/rest-dev/extensions#id_59112, I send a PUT request to http://xxx:8003/v1/config/resources/first-extension (the content of the extension itself is at the end of this email). Then I receive the following error:
415 Unsupported Media Type <rapi:error xmlns:rapi="http://marklogic.com/rest-api"> <rapi:status-code>415</rapi:status-code> <rapi:status>Unsupported Media Type</rapi:status> <rapi:message-code>RESTAPI-INVALIDMIMETYPE</rapi:message-code> <rapi:message>RESTAPI-INVALIDMIMETYPE: (err:FOER0000) Invalid mime type: reason: mime type must be application/xquery or application/vnd.marklogic-xdmp</rapi:message> </rapi:error> As you can see on http://fgeorges.org/tmp/ml-rest-api-ext.png, the content type header is set to application/xquery (as mentioned in the error message, I also tried application/vnd.marklogic-xdmp, with no success). Any idea? Just in case, the body of the PUT is: xquery version "1.0-ml"; module namespace my = "http://marklogic.com/rest-api/resource/first-extension"; declare function my:get( $context as map:map, $params as map:map ) as document-node()* { <error>IMPLEMENT ME!</error> }; declare function my:put( $context as map:map, $params as map:map, $input as document-node()* ) as document-node()? { <error>IMPLEMENT ME!</error> }; declare function my:post( $context as map:map, $params as map:map, $input as document-node()* ) as document-node()* { <error>IMPLEMENT ME!</error> }; declare function my:delete( $context as map:map, $params as map:map ) as document-node()? { <error>IMPLEMENT ME!</error> }; Any idea? Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general