Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-3429

Allow HTTP response codes in libprocess to be matched

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.26.0
    • None

    Description

      Currently calling process::http::get|post gives you a Response struct, and all the specific status codes inherit from the Response (OK, Accepted, etc).

      However, to be able to tell what specific response code it represents, we have to match the status string (response.status == "200 OK").

      I propose that to avoid doing this from the callers, we should allow a more enumed type check such as (response.status == Response::OK).

      Attachments

        Activity

          People

            tnachen Timothy Chen
            tnachen Timothy Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: