1 /* 2 * Copyright 2009-2017 Alibaba Cloud All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #pragma once 18 19 #include <string> 20 #include <map> 21 #include <alibabacloud/oss/Export.h> 22 23 namespace AlibabaCloud 24 { 25 namespace OSS 26 { 27 28 class ALIBABACLOUD_OSS_EXPORT Http 29 { 30 public: 31 enum Method 32 { 33 Get, 34 Head, 35 Post, 36 Put, 37 Delete, 38 Connect, 39 Options, 40 Patch, 41 Trace 42 }; 43 enum Scheme 44 { 45 HTTP, 46 HTTPS 47 }; 48 static std::string MethodToString(Method method); 49 static std::string SchemeToString(Scheme scheme); 50 51 //HEADERS 52 static const char* ACCEPT; 53 static const char* ACCEPT_CHARSET; 54 static const char* ACCEPT_ENCODING; 55 static const char* ACCEPT_LANGUAGE; 56 static const char* AUTHORIZATION; 57 static const char* CACHE_CONTROL; 58 static const char* CONTENT_DISPOSITION; 59 static const char* CONTENT_ENCODING; 60 static const char* CONTENT_LENGTH; 61 static const char* CONTENT_MD5; 62 static const char* CONTENT_RANGE; 63 static const char* CONTENT_TYPE; 64 static const char* DATE; 65 static const char* EXPECT; 66 static const char* EXPIRES; 67 static const char* ETAG; 68 static const char* LAST_MODIFIED; 69 static const char* RANGE; 70 static const char* USER_AGENT; 71 72 }; 73 } 74 } 75