Plugin Directory

Changeset 3372673


Ignore:
Timestamp:
10/04/2025 02:29:05 AM (5 months ago)
Author:
kittlam
Message:

update files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pkl-wpz-rest-api-auth/trunk/readme.txt

    r3372670 r3372673  
    7070Example 1: Get Posts
    7171
    72 ``php
    73 $response = wp_remote_get( 'https://yoursite.com/wp-json/wp/v2/posts', array(
     72    $response = wp_remote_get( 'https://yoursite.com/wp-json/wp/v2/posts', array(
    7473        'headers' => array(
    7574            'Authorization' => 'Bearer YOUR_API_KEY'
     
    7776    ) );
    7877
    79     if ( ! is_wp_error( $response ) ) {
    80         $data = json_decode( wp_remote_retrieve_body( $response ) );
    81     }
    82 
    8378Example 2: Create Post
    8479
    85 ``php
    86 <?php
    8780    $response = wp_remote_post( 'https://yoursite.com/wp-json/wp/v2/posts', array(
    8881        'headers' => array(
Note: See TracChangeset for help on using the changeset viewer.