-
Notifications
You must be signed in to change notification settings - Fork 28
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
AlamoFire example wrong? #56
Comments
@crayment A let turntable = Turntable( vinylName: "vinyl_simple", configuration: configuration)
turntable.delegate = aDelegate
let manager = Alamofire.Manager(turntable, delegate: aDelegate) |
@RuiAAPeres Thanks for the response! I can't do that because I'd love to use this lib but not sure it's ready. Is my understanding correct that it doesn't create the Vinyls yet? You have to type them out manually? |
@crayment that's a good point, we can override the delegate and make it read/write, if I am not mistaken. As for the lib itself, I have been using it in my own projects and company ones. Right now the library is not recording (WIP #12), but you can easily create it our own. You have two manual choices:
|
Cool, maybe I will take another stab and try to contribute that change. I assume you guys are using it directly with NSURLSession (skipping Alamofire)? When you say create the vinyl file programatically - is there already logic in the library to encode a Thanks again! |
We exposed a couple of helper methods, that you can find here. These will create let track = TrackFactory.createValidTrack(NSURL(string: "http://feelGoodINC.com")!, body: data, headers: headers)
let vinyl = Vinyl(tracks: [track])
let turntable = Turntable(vinyl: vinyl, configuration: configuration) |
Ah I see what you mean by create programatically now. I really think a big part of the advantage of the VCR strategy is that you start with real network requests - so you know they are correct representations of what will come back from the server. Will eagerly await completion of #12 :) |
@crayment that's very true! For my personal, and professional, usage, I haven't found a need for it, so I haven't pursue this too much. Will discuss this piece of work with @dmcrodrigues. Hopefully the lack of this feature, won't stop you from using the lib. |
You mention a setup example for working with AlamoFire here but this seems to look over the fact that the recommended init on
Manager
validates thatdelegate === session.delegate
.Am I missing something here or this doesn't really work with AlamoFire?
The text was updated successfully, but these errors were encountered: