Peter-Schorn / SpotifyAPI

A Swift library for the Spotify web API. Supports all endpoints.
https://peter-schorn.github.io/SpotifyAPI/documentation/spotifywebapi
MIT License
269 stars 33 forks source link

Enable proxy endpoints to be used #26

Closed 8W9aG closed 3 years ago

8W9aG commented 3 years ago

Change the apiBase to a var instead of a let in order to allow the consumer of the API to change the endpoint to a proxy endpoint.

Peter-Schorn commented 3 years ago

What proxy endpoints do you plan on using?

8W9aG commented 3 years ago

Localhost squid proxy endpoints

Peter-Schorn commented 3 years ago

What is squid? Please be more specific.

8W9aG commented 3 years ago

http://www.squid-cache.org/

Peter-Schorn commented 3 years ago

You should just use SpotifyAPI.networkAdaptor instead to proxy requests.

8W9aG commented 3 years ago

That works thanks. Would you be amenable to a change where I allow the defaultNetworkAdaptor in URLSessionWrappers.swift to be accessible from outside? At the moment I simply copy the combine code out of that and use that in my custom adapter, seems wasteful though.

Peter-Schorn commented 3 years ago

I'll accept that change. Open a new pull request.