Add http_method to Curl::Easy #23

Open
andrehjr opened this Issue Jan 19, 2010 · 5 comments

2 participants

@andrehjr

I was in need of something like this... and it's kinda of simple

so I added a http_method that returns the last http_method called..

c = Curl::Easy.perform("http://www.example.com")
c.http_method
=> "GET"

Here it's what I did:
http://github.com/andrehjr/curb/commit/3df0d4ad2ba0fd450d44c7e8c05f48e7c50f73c1

@taf2
Owner

I added a few comments on the commit.

@andrehjr

oh sorry.. I've got busy at work...
I'll take a look at it now!
thanks!

@andrehjr

ok..
by GC calls you mean calling rb_gc_mark on rbce->http_method ?

@taf2
Owner

Yes

@andrehjr

Then, it's done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment