Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions simplepush.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"crypto/cipher"
"crypto/rand"
"crypto/sha1"
"crypto/tls"
"encoding/base64"
"encoding/hex"
"errors"
Expand All @@ -16,6 +17,12 @@ import (
"net/url"
)

func init() {
// Disable HTTP/2 support- see the package overview in net/http docs
tr, _ := http.DefaultTransport.(*http.Transport)
tr.TLSNextProto = make(map[string]func(authority string, c *tls.Conn) http.RoundTripper)
}

// Message contains all the information necessary to send a, potentially encrypted, message.
type Message struct {
SimplePushKey string // Your simeplepush.io key
Expand Down