Skip to content

Commit 1fc94f9

Browse files
authored
Merge pull request #308 from YlanzinhoY/feat-add-many-mime-types-constants
feat: add MIME types constants for content types
2 parents a0e0ff1 + a84fad2 commit 1fc94f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ const (
2323
ExchangeHeaders = "headers"
2424
)
2525

26+
// MIME types constants
27+
const (
28+
MimeTextPlain = "text/plain"
29+
MimeApplicationJSON = "application/json"
30+
MimeApplicationOctetStream = "application/octet-stream"
31+
MimeApplicationXML = "application/xml"
32+
MimeTextXML = "text/xml"
33+
MimeApplicationProtobuf = "application/protobuf"
34+
MimeApplicationXProtobuf = "application/x-protobuf"
35+
MimeApplicationMsgPack = "application/msgpack"
36+
MimeApplicationAvro = "application/avro"
37+
MimeApplicationCloudEventsJSON = "application/cloudevents+json"
38+
MimeApplicationFormURLEncoded = "application/x-www-form-urlencoded"
39+
)
40+
2641
var (
2742
// ErrClosed is returned when the channel or connection is not open
2843
ErrClosed = &Error{Code: ChannelError, Reason: "channel/connection is not open"}

0 commit comments

Comments
 (0)