[jboss-jira] [JBoss JIRA] (WFWIP-152) Metrics endpoint should inform about supported request types, HTTP code change to be considered

Rostislav Svoboda (Jira) issues at jboss.org
Tue Nov 13 11:26:01 EST 2018


Rostislav Svoboda created WFWIP-152:
---------------------------------------

             Summary: Metrics endpoint should inform about supported request types, HTTP code change to be considered
                 Key: WFWIP-152
                 URL: https://issues.jboss.org/browse/WFWIP-152
             Project: WildFly WIP
          Issue Type: Enhancement
          Components: MP Metrics
            Reporter: Rostislav Svoboda
            Assignee: Jeff Mesnil


Metrics endpoint could inform about supported request types, current response is

{code}
curl http://127.0.0.1:10090/metrics/vendor -X PUT
No exporter found for method PUT and media type
{code}


OpenLiberty provide info which HTTP verbs are supported
{code}
curl https://localhost:9443/metrics/ --insecure -u theUser:thePassword -X PUT
Error 405: CWMMC0001I: The method request type must be GET or OPTIONS.
{code}

Side comment - We return {{< HTTP/1.1 406 Not Acceptable}}, OpenLiberty returns {{< HTTP/1.1 405 Method Not Allowed}} which feels more appropriate.

Spec speaks only about 404 and 406.
{code}
• 404 if a directly-addressed item does not exist. This may be a non-existing sub-tree or non- existing object
• 406 if the HTTP Accept Header in the request cannot be handled by the server.
{code}
But 406 only mentions Accept Header, not the HTTP verb.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list