gdi / curb-fu

Simple, yet powerful wrapper for taf2's curb (libcurl) library
Other
57 stars 9 forks source link

Allow passing url as string AND passing headers #10

Closed whatcould closed 13 years ago

whatcould commented 13 years ago

Hey there,

Currently, if you need to pass the :headers hash, you must pass the URL as a hash; this means if you have a URL that's a string, you have to break it apart (and pass :host, :protocol, etc), and then CurbFu puts it back together again.

This change allows passing :url

(The API here isn't perfect -- it's not clear to me why headers are passed in what seems to be the URL hash. But, this works, and is compatible with the current API.)

thanks david

hypomodern commented 13 years ago

Thanks for the contribution! You caught me right after I left for a vacation, so sorry for the long turnaround :). Cheers!