Skip to content
Advertisement

convert curl post to wp_remote_post

Here is curl code which is working very good

JavaScript

But if i try to convert this above code to worpress wp_remote_post i am getting error.

JavaScript

here is response i am getting

https://pastebin.com/Ap5LpfZb

Please let me know where i am doing wrong ?

Advertisement

Answer

I got it there was problem with the header array i was passing that array wrongly

Wrong code was

JavaScript

Here is correct version of code

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement