Apache Mesos
http.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __MESOS_HTTP_HPP__
18 #define __MESOS_HTTP_HPP__
19 
20 #include <iosfwd>
21 
22 namespace mesos {
23 
24 const char APPLICATION_PROTOBUF[] = "application/x-protobuf";
25 const char APPLICATION_JSON[] = "application/json";
26 
27 
28 // The content-type used for streaming requests/responses.
29 const char APPLICATION_RECORDIO[] = "application/recordio";
30 
31 
32 // The header used by the client/server to specify the content-type
33 // of messages in a streaming request/response.
34 const char MESSAGE_CONTENT_TYPE[] = "Message-Content-Type";
35 
36 
37 // The header used by the client to specify acceptable content-type
38 // of messages in a streaming response.
39 const char MESSAGE_ACCEPT[] = "Message-Accept";
40 
41 
42 // Possible content-types that can be used for requests to the Mesos HTTP API.
43 enum class ContentType
44 {
45  PROTOBUF,
46  JSON,
47  RECORDIO
48 };
49 
50 
51 std::ostream& operator<<(std::ostream& stream, ContentType contentType);
52 
53 } // namespace mesos {
54 
55 #endif // __MESOS_HTTP_HPP__
std::ostream & operator<<(std::ostream &stream, const Attribute &attribute)
ContentType
Definition: http.hpp:43
const char APPLICATION_RECORDIO[]
Definition: http.hpp:29
const char APPLICATION_PROTOBUF[]
Definition: http.hpp:24
const char MESSAGE_ACCEPT[]
Definition: http.hpp:39
const char APPLICATION_JSON[]
Definition: http.hpp:25
const char MESSAGE_CONTENT_TYPE[]
Definition: http.hpp:34