curlWrapper uses string intead of pointers and malloc