Skip to content

Commit

Permalink
Merge pull request #582 from ripienaar/headers_supported
Browse files Browse the repository at this point in the history
add a helper to determine if headers is supported
  • Loading branch information
derekcollison authored Jul 20, 2020
2 parents e08031f + 5e892ee commit 97eff70
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -4303,6 +4303,13 @@ func (nc *Conn) MaxPayload() int64 {
return nc.info.MaxPayload
}

// HeadersSupported will return if the server supports headers
func (nc *Conn) HeadersSupported() bool {
nc.mu.RLock()
defer nc.mu.RUnlock()
return nc.info.Headers
}

// AuthRequired will return if the connected server requires authorization.
func (nc *Conn) AuthRequired() bool {
nc.mu.RLock()
Expand Down

0 comments on commit 97eff70

Please sign in to comment.