Tuesday, August 30, 2022
HomeWordPress Developmentwp distant put up - wp_remote_post return 419

wp distant put up – wp_remote_post return 419


I am making an attempt to work together with my laravel API, the primary methodology is login which does not require any bearer token. I examined with postman and all the pieces works nicely, sadly after I attempt with wordpress I get:

419 Web page expired

From the API.
I believe there’s something from wordpress website that I did not set appropriately, test my code:

$url = $this->api_endpoint . "https://wordpress.stackexchange.com/" . $motion;

$physique = [
    'email' => 'test@gmail.com',
    'password' => '123456789'    
]

$response = wp_remote_post($url, [
    'method' => 'POST',
    'body' => $body,
    'headers' => [
        'Content-type: application/x-www-form-urlencoded'
    ]
]);

var_dump($response);
die();

return $response;

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments