You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Timothy Chen (JIRA)" <ji...@apache.org> on 2015/09/15 01:07:45 UTC

[jira] [Created] (MESOS-3429) Allow HTTP response codes in libprocess to be matched

Timothy Chen created MESOS-3429:
-----------------------------------

             Summary: Allow HTTP response codes in libprocess to be matched 
                 Key: MESOS-3429
                 URL: https://issues.apache.org/jira/browse/MESOS-3429
             Project: Mesos
          Issue Type: Improvement
            Reporter: Timothy Chen
            Assignee: Timothy Chen


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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)