Support curl plugin

I finally took care of #143, please refer to it for comments