-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Description
Question Description
I've to make some requests to a specific host with an URL encoded through the params, such as:
https://example.my.host/other.host%2path%2to%2data%31231231
But instead, it parses to:
https://example.my.host/other.host/path/to/data/31231231
I tried using DisablePathNormalizing from my agent, but it didn't work and seems like it doesn't apply any effect on the method Parse from FastHttp.
Code Snippet (optional)
package main
import "github.com/gofiber/fiber/v3"
import "log"
func main() {
agent := fiber.Get(fmt.Sprintf("https://example.my.host/%s", url.QueryEncode("other.host/path/to/data/31231231")))
// If you tries to debug it, it'll show like
// https://example.my.host/other.host%2path%2to%2data%231231231
agent.DisablePathNormalizing = true
agent.Set("Content-Type", "application/json")
// It parses to https://example.my.host/other.host/path/to/data/31231231
slog.Info("URL: ", agent.Request().URI().String())
}Checklist:
- I agree to follow Fiber's Code of Conduct.
- I have checked for existing issues that describe my questions prior to opening this one.
- I understand that improperly formatted questions may be closed without explanation.
Reactions are currently unavailable