This works in php: $postdata = http_build_query( array( 'api' => get_option('API_key'), 'gw' => '1' ) ); $opts = array('http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content'...
  • May 7, 2022
  • 0 Comments
What I’m trying to do: Passing POST data by using wp_remote_post. foreach ( $articles as $article_id ) { $postarray = array( 'method' => 'POST', 'timeout' => 5, 'redirection' =>...
  • May 5, 2022
  • 0 Comments
IT Nursery
I’m building a mailchimp integration and they require a POST call with JSON code. No, I’m using this code that actually works: $data = wp_remote_post($url, array( 'headers' => array('Content-Type'...
  • April 10, 2022
  • 0 Comments