Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

弱弱的问一句,goz.Options里面的BaseURI是干哈的? #20

Open
yu1ec opened this issue Jan 8, 2021 · 2 comments
Open

弱弱的问一句,goz.Options里面的BaseURI是干哈的? #20

yu1ec opened this issue Jan 8, 2021 · 2 comments

Comments

@yu1ec
Copy link

yu1ec commented Jan 8, 2021

我这边以为BaseURI就类似axios里面的BaseURI,设置完了调用Get啥的可以不需要接url,但是,发现,不行,好像根本没拼接进去,大佬能说哈咋用吗?

@rafa-acioly
Copy link
Contributor

rafa-acioly commented Mar 5, 2022

I'm facing the same issue, I've added BaseURI on my goz.Options but this value is not being used on the request, e.g:

client := goz.NewClient(goz.Options{
    Debug:   true,
    BaseURI: "https://api.some-website.com",
    Timeout: 15,
    Headers: map[string]interface{}{
        "User-Agent":   "MELI-GOLANG-SDK",
        "Content-Type": "application/json; charset=utf-8",
        "verify":       true,
    },
    Query: map[string]interface{}{},
}),

when I call

client.Post("/items", myData)

I get the error:

Unsupported schema ""

@yu1ec
Copy link
Author

yu1ec commented Mar 5, 2022

Yes, I read the source code, this configuration is useless, I think the author does not want to spend time on this, I originally made up for it as a private package, but I do not use it now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants