From bf77da832cbea2b5e0c9ca668cb3ae0020b50836 Mon Sep 17 00:00:00 2001 From: purofle Date: Mon, 19 Feb 2024 09:23:20 +0800 Subject: [PATCH] Update README.md (#772) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6d501ef..c478a555 100644 --- a/README.md +++ b/README.md @@ -797,7 +797,7 @@ client.SetTimeout(1 * time.Minute) // You can override all below settings and options at request level if you want to //-------------------------------------------------------------------------------- // Host URL for all request. So you can use relative URL in the request -client.SetHostURL("http://httpbin.org") +client.SetBaseURL("http://httpbin.org") // Headers for all request client.SetHeader("Accept", "application/json") @@ -861,7 +861,7 @@ client := resty.New() // Set the previous transport that we created, set the scheme of the communication to the // socket and set the unixSocket as the HostURL. -client.SetTransport(&transport).SetScheme("http").SetHostURL(unixSocket) +client.SetTransport(&transport).SetScheme("http").SetBaseURL(unixSocket) // No need to write the host's URL on the request, just the path. client.R().Get("http://localhost/index.html")