added headers and data support, dynamic API