Skip to content

Commit

Permalink
Fix saving TXT records with plus sign
Browse files Browse the repository at this point in the history
  • Loading branch information
Loupeznik committed Aug 22, 2024
1 parent 6870ea7 commit 8f092d9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/requestBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"

"github.com/loupeznik/better-wapi/src/models"
)

func BuildRequest(baseUrl string, model *models.Request) *http.Request {
if model.Body.Data.Type == "TXT" {
model.Body.Data.IP = url.QueryEscape(model.Body.Data.IP)
}

requestBody, err := json.Marshal(model)

if err != nil {
Expand Down

0 comments on commit 8f092d9

Please sign in to comment.