-
-
Notifications
You must be signed in to change notification settings - Fork 772
Open
Description
Hi, I found a possible issue when using Resty with a GET request that contains a body.
According to my use case, I need to send a GET request with a JSON body, but Resty seems to ignore the body entirely.
`func main() {
client := resty.New()
url := "xxxxxxxx"
requestBody := map[string]interface{}{
"xx": "xxx",
"xxx": "xxx",
"xx": xxx,
}
josnBody, _ := json.Marshal(requestBody)
resp, err := client.R().
SetHeader("Authorization", authorizationHeader).
SetHeader("Accept", "*/*").
SetBody(josnBody).
Get(url) //
if err != nil {
log.Fatal(err)
}
}`
Metadata
Metadata
Assignees
Labels
No labels