Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoHTTP ¶
func DoHTTP(client *http.Client, method, contentType, address string, fields url.Values, body []byte, onResponse Response) (resp *http.Response, err error)
DoHTTP sends an HTTP Request for sending an SMS
func OnGettingSMS ¶
func OnGettingSMS(path string, mux *http.ServeMux, httpHandler http.HandlerFunc)
OnGettingSMS is an HTTP server handler when incoming SMS arrives. If mux exists, it will use it for a server, otherwise it will use http.HandleFunc.
Types ¶
type HTTPHandler ¶
type HTTPHandler interface { DoHTTP(method, contentType, address string, fields url.Values, body []byte) (resp *http.Response, err error) OnGettingSMS(path string, mux *http.ServeMux, httpHandler http.HandlerFunc) }
HTTPHandler interface for working with HTTP client interface
type RESTHandler ¶ added in v0.0.9
type RESTHandler interface {
SendSMS(method string, client *http.Client, onResponse Response) (*http.Response, error)
}
RESTHandler is an interface to send and post SMS messages using HTTP REST
Click to show internal directories.
Click to hide internal directories.