github.com/gramework/gramework@v1.8.1-0.20231027140105-82555c9057f5/const.go (about) 1 // Copyright 2017-present Kirill Danshin and Gramework contributors 2 // Copyright 2019-present Highload LTD (UK CN: 11893420) 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 11 package gramework 12 13 const ( 14 // MethodDELETE is the HTTP DELETE method 15 MethodDELETE = "DELETE" 16 17 // MethodGET is the HTTP GET method 18 MethodGET = "GET" 19 20 // MethodHEAD is the HTTP HEAD method 21 MethodHEAD = "HEAD" 22 23 // MethodOPTIONS is the HTTP OPTIONS method 24 MethodOPTIONS = "OPTIONS" 25 26 // MethodPATCH is the HTTP PATCH method 27 MethodPATCH = "PATCH" 28 29 // MethodPOST is the HTTP POST method 30 MethodPOST = "POST" 31 32 // MethodPUT is the HTTP PUT method 33 MethodPUT = "PUT" 34 ) 35 36 const ( 37 acceptHeader = "Accept" 38 badRequest = "Bad Request" 39 corsAccessControlAllowCredentials = "Access-Control-Allow-Credentials" 40 corsAccessControlAllowHeaders = "Access-Control-Allow-Headers" 41 corsAccessControlAllowMethods = "Access-Control-Allow-Methods" 42 corsAccessControlAllowOrigin = "Access-Control-Allow-Origin" 43 corsCType = "Content-Type, *" 44 contentType = "Content-Type" 45 emptyString = "" 46 fmtV = "%v" 47 fmtS = "%s" 48 forbidden = "Forbidden" 49 hOrigin = "Origin" 50 htmlCT = "text/html; charset=utf8" 51 https = "https" 52 jsonCT = "application/json;charset=utf8" 53 jsonCTshort = "application/json" 54 delimiterCTParams = ";" 55 gqlCT = "application/graphql" 56 methods = "GET,PUT,POST,DELETE" 57 trueStr = "true" 58 xmlCT = "text/xml" 59 csvCT = "text/csv" 60 xRequestID = "X-Request-ID" 61 forbiddenCode = 403 62 redirectCode = 301 63 temporaryRedirectCode = 307 64 one = 1 65 zero = 0 66 // ContextKey defines where in context.Context will be stored gramework.Context for current request 67 ContextKey contextKey = "gramework:request:ctx" 68 // plainCT = "text/plain" 69 )