Add method to create request with form data

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-07-11 14:11:41 -04:00
parent 4094044593
commit 8f95f3880a
10 changed files with 40 additions and 41 deletions
+2 -1
View File
@@ -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
}