GithubHelp home page GithubHelp logo

Comments (4)

aurelien-m avatar aurelien-m commented on May 26, 2024 2

Extra note: I've also modify your app to be able to read GeoJSON files and extract tiles from a polygon. You can see what I've done here: https://github.com/aurelien-m/wms-tiles-downloader/pull/2/files.

from wms-tiles-downloader.

lmikolajczak avatar lmikolajczak commented on May 26, 2024

Hi @aurelien-m 👋

Thanks for opening this issue! I'm open to any proposals you have to fix this, we can briefly discuss it and either you can open a PR with a fix or I can work on it. Up to you 😉 Let me know which way you prefer.

from wms-tiles-downloader.

lmikolajczak avatar lmikolajczak commented on May 26, 2024

Speaking of possible solution, the first and most simple thing that comes to my mind is to add new ClientOption:

func WithBasicHTTPAuth(username, password string) ClientOption {
	return func(c *Client) {
		c.username = username
		c.password = password
	}
}

Then we can access both username and password in the request method of the Client via c.username, c.password and use it to set it on the request object as you did in the code snippet above 😉 What do you think?

from wms-tiles-downloader.

aurelien-m avatar aurelien-m commented on May 26, 2024

Hey @lmikolajczak!

So I've actually done something similar in my own fork: https://github.com/aurelien-m/wms-tiles-downloader/pull/1/files. I've also added useBasicAuth in the client struct to check if we need authentication or not. I can create a draft pull request out of it if you think it's a good start.

And by the way, I haven't done a lot of Go, so don't hesitate if you see anything clumsy 😄

from wms-tiles-downloader.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.