Questions tagged [curl]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
17
votes
4answers
39k views

How to use OAuth authentication with REST API via CURL commands?

I am trying to use the WordPress Rest Api with authentication to get more data from the API. I have installed the Oauth plugin, rest-api plugin, and gotten API credentials from WP-CLI. I have ...
17
votes
3answers
10k views

Is it safe to use sslverify => true for with wp_remote_get/wp_remote_post

I normally use this argument to prevent errors with wp_remote_get and wp_remote_post array( 'sslverify' => false ) For security reasons I would like to set it to true (or remove it since the ...
0
votes
1answer
767 views

Add media with WP-Rest-API v2 II

I am having this exact question, asked in 2015, about adding media through the WP REST API. My code so far: curl -s -X POST http://www.example.com/wp-json/wp/v2/media/ -H "Content-Type: ...
4
votes
2answers
1k views

Re use authenticated HTTP connection or cUrl handle

We have a bespoke Wordpress plugin, which adds a meta box to the edit post page. The plugin accesses data from a semi-private HTTP REST API. The connection is authenticated (DIGEST) and accessed ...
1
vote
0answers
914 views

wp_remote_get() to get AJAX url /wp-admin/admin-ajax.php

Regarding to this post I started to create an AJAX handler with the default WordPress AJAX API. I want to call a non-blocking call to another AJAX handler, in the same WordPress site. Order of ...
0
votes
1answer
2k views

Build dynamic page from cURL (HTML page) response with plugin

I feel like I am missing something simple here, but can't figure it out I need to have my plugin build links to a page that is built entirely via a cURL response. I am building a plugin that ...