Skip to content

Commit

Permalink
added some list http header (#17)
Browse files Browse the repository at this point in the history
* remove unused codes

* added some list http header
  • Loading branch information
irdaislakhuafa authored Dec 19, 2023
1 parent 79828bf commit a26d0da
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
33 changes: 33 additions & 0 deletions header/header.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package header

const (
// Headers keys
KeyRequestID = "x-request-id"
KeyAuthorization = "authorization"
KeyUserAgent = "user-agent"
KeyContentType = "content-type"
KeyContentAccept = "accept"
KeyAcceptLanguage = "accept-language"
KeyCacheControl = "cache-control"

// Content type.Specifying the payload in the request
ContentTypeJSON = "application/json"
ContentTypeXML = "application/xml"
ContentTypeForm = "application/x-www-form-urlencoded"

// Accepting media. Specifying the types of requested media (in the response)
// See here: https://en.wikipedia.org/wiki/Content_negotiation
MediaTextPlain = "text/plain"
MediaTextHTML = "text/html"
MediaTextCSV = "text/csv"
MediaTextXML = "text/xml"

MediaImageGIF = "image/gif"
MediaImageJPEG = "image/jpeg"
MediaImagePNG = "image/png"
MediaImageWEBP = "image/webp"

// Cache control
CacheControlNoCache = "no-cache"
CacheControlNoStore = "no-store"
)
12 changes: 0 additions & 12 deletions main.go

This file was deleted.

0 comments on commit a26d0da

Please sign in to comment.