Closed marcoroganovic closed 5 years ago
Hey @marcoroganovic,
If the library does not directly implement the HTTPClient
interface I would recommend wrapping the fasthttp
code in a struct and passing that to the Options
:
type MyFastHTPClient struct {}
func (c *MyFastHTPClient) Do(r *http.Request) (*http.Response, error) {
// fasthttp code
}
&webpush.Options{
Client: &MyFastHTPClient{},
}
Hopefully this helps.
Hi, is there a way to use fasthttp client with webpush-go package? I'm new to Go language, and reading source I can see that it has client option.