• HTTP method Head with REST Domino Access Services ends in HTTP Status Code 405

    By Sven Petri 1 decade ago

    (This is a repost from the social enabler project, maybe it belongs here - sorry for that)

    Hello,

    I am using the Domino REST Api that comes with the extension library/ upgrade pack.

    The HTTP method "head" on my domino server is configured to be a valid method. Head-Requests to other XPages return HTTP 200 and the needed headers fine.

    The REST Api returns 405 Method not supported.

    This looks like a bug to me since an api should handle head-requests for better performance.

    Example:

            C:\curl_728_1>curl.exe -I http://server/xpagesext.nsf/REST_DataService.xsp/viewEntriesPathInfo
        HTTP/1.1 405 Method Not Allowed
        Server: Lotus-Domino
        Date: Fri, 22 Feb 2013 09:04:25 GMT
        Connection: close
        Set-Cookie: SessionID=DEMBFEHX65; path=/
        Content-Type: text/html;charset=utf-8
        Content-Length: 2146

    • Need more info ...

      By Dave Delay 1 decade ago

      You said you are using Domino Access Services, but your sample URL is:

       

      http://server/xpagesext.nsf/REST_DataService.xsp/viewEntriesPathInfo

       

      This implies you are actually using a REST service control on an XPage.  The corresponding DAS URL would be something like:

       

      http://server/xpagesext.nsf/api/data/collections/name/AllContacts

       

      So I just want to be sure about your request.  Is it for the REST control or DAS (the data service)? 

       

      Also, what is your use case?  For example, are you trying to find out when the view was last modified without fetching the data?  What other HTTP response headers are you interested in?

       

      Thanks.

       

      -- Dave

      • Use Case and more info

        By Sven Petri 1 decade ago

        Hello Dave,

        yes, i am using a REST service control on an XPage, sorry for the confusion.

        My use case is that the REST api is accessed by systems that do not know what a view is. They only know the URLs to the api and do internal caching of the data of the api. To do this they save the HTTP-Headers of their GET requests and just make an HTTP HEAD request afterwards to check if their saved headers match these.

        They only make a full GET request if the HEAD request shows their data is outdated.

        Best regards,

        Sven

    • Could you provide a sample app to demo this issue?

      By Paul Hannan 1 decade ago
      • In xpagesext.nsf - Menue REST - Data Service - Button "View Collection"

        By Sven Petri 1 decade ago

        Hello Paul,

        i would like to link you to the database on openntf ( http://dev.openntf.org/demos/demoextlib.nsf ) - but the server behind "dev.openntf.org" is dead for weeks now sadly.

        I'm sorry i have no sample extlib in the DMZ or on our production servers. :(

        The URL would be: http:///XPagesExt.nsf/REST_DataService/viewPathInfo

        Best Regards,

        Sven