I am able to implement http basic auth in wp_remote_get using the following code

$args = array(
    'headers' => array(
        'Authorization' => 'Basic ' . base64_encode( $username . ':' . $password )
    )
);
wp_remote_request( $url, $args );

Is it possible to do http digest based authentication using wp_remote_get function?

2 s
2

It is possible to do HTTP DIGEST authentication with wp_remote_get(), but it’s somewhat complicated. I’ve written a short wrapper function you can use.

Leave a Reply

Your email address will not be published. Required fields are marked *