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

properties not making through... #2

Closed
stallent opened this issue Jun 28, 2014 · 3 comments
Closed

properties not making through... #2

stallent opened this issue Jun 28, 2014 · 3 comments

Comments

@stallent
Copy link

Hi. Good chance i'm missing something, but the given examples such as:

var request = HTTPTask()
request.baseURL = "http://api.someserver.com/1"
request.GET...

Don't work because each http method in the Task class, such as get, create a new HTTP task instead of using self.

func GET(url: Str... {
var task = HTTPTask()
task.run(url,method: .GET,parameters: parameters,success,failure)
}

So any property set in the first snippet, whether it be baseURL or a custom request serializer, don't get used. Am i missing something or should the second snippet NOT create a new Task() and instead use self?

Thanks!

@daltoniam
Copy link
Owner

Thank you! Nice catch, totally missed that. Just checked in a fix, let me know if that works.

@stallent
Copy link
Author

Thx. And also because i'm too lazy to do a pull request, line 40 of HTTPRequestSerializer has what appears to be a code hinting or copy/paste error. Its currently:

request.HTTPShouldHandleCookies = self.HTTPShouldUsePipelining

and needs to be

request.HTTPShouldUsePipelining = self.HTTPShouldUsePipelining

Thanks!

@daltoniam
Copy link
Owner

Man, you are taking me to the cleaners 😄. Any who, I checked in the fix for that as well. Thanks again, I appreciate it.

daltoniam pushed a commit that referenced this issue Sep 10, 2015
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