Closed chintanbanugaria closed 6 years ago
Found the solution. I just removed the ->withContentType('application/json')
and it worked like a charm.
Thanks,
I was going to suggest the ->asJson()
method, I think that also would have solved your problem. Glad it all worked out
Yup. thanks. Awesome package BTW.
Nice, glad you're enjoying it!
Laravel 5.6 ixudra/curl : 6.16
My Issue is I am not able to send the POST request. I am getting blank response. GET request is working fine. Here's my code
Curl::to('https://abc.com/getKey') ->withContentType('application/json') ->withHeaders(['header1:blah', 'header2:blah']) ->withData(['data1' => $blah, 'data2' => 'blah']) ->asJson() ->post();
I tried with traditional curl_init() method for post request and it was working fine.Am I doing something wrong here ?
Thanks, Chintan