w3c / apiary

Simple JS library to use the W3C API in a declarative way
MIT License
15 stars 8 forks source link

Fix usage of developer keys #13

Closed tripu closed 9 years ago

tripu commented 9 years ago

Correction over #12:

Add support for API keys with an Authorization header apikey parameter.

My previous PR was incomplete because I wasn't handling CORS properly. This method is simpler and faster (saves one HTTP request).

Fix #4.

darobin commented 9 years ago

In an ideal world you wouldn't have to play with strings in order to manipulate the query string, but I reckon that given that you're targeting potentially old browsers this'd require a library, which wouldn't be great :)

tripu commented 9 years ago

In an ideal world you wouldn't have to play with strings in order to manipulate the query string

Definitely. I don't like playing with strings either. What do you have in mind?

darobin commented 9 years ago

Well, there's https://url.spec.whatwg.org/#api but it's not yet supported everywhere (that I know of). I know there's a JS implementation but I think it's overkill in this case, no?

tripu commented 9 years ago

Agreed, @darobin.