Uploaded image for project: 'WildFly WIP'
  1. WildFly WIP
  2. WFWIP-152

Metrics endpoint should inform about supported request types, HTTP code change to be considered

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • MP Metrics
    • None

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

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

      OpenLiberty provide info which HTTP verbs are supported

      curl https://localhost:9443/metrics/ --insecure -u theUser:thePassword -X PUT
      Error 405: CWMMC0001I: The method request type must be GET or OPTIONS.
      

      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.

      • 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.
      

      But 406 only mentions Accept Header, not the HTTP verb.

            jmesnil1@redhat.com Jeff Mesnil
            rsvoboda@redhat.com Rostislav Svoboda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: