Skip to content

Commit

Permalink
Added query escape for MiraRequest (FIX)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecsw committed Jul 21, 2019
1 parent 453f457 commit 69adf08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reddit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"errors"
"fmt"
"net/http"
"net/url"
"strconv"
"strings"
)

func (c *Reddit) MiraRequest(method string, target string, payload map[string]string) ([]byte, error) {
values := "?"
for i, v := range payload {
v = strings.ReplaceAll(v, " ", "+")
v = url.QueryEscape(v)
values += fmt.Sprintf("%s=%s&", i, v)
}
values = values[:len(values)-1]
Expand Down

0 comments on commit 69adf08

Please sign in to comment.