Add method to create request with form data
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
+2
-1
@@ -177,7 +177,8 @@ func (s *SubredditService) SearchSubredditInfo(ctx context.Context, query string
|
||||
|
||||
func (s *SubredditService) handleSubscription(ctx context.Context, form url.Values) (*Response, error) {
|
||||
path := "api/subscribe"
|
||||
req, err := s.client.NewPostForm(path, form)
|
||||
|
||||
req, err := s.client.NewRequestWithForm(http.MethodPost, path, form)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user