I’m not sure what you’re after here, but you can try to get the HTTP response object from the WP_HTTP_Requests_Response::get_response_object()
method.
Here’s an example to retrieve the url:
if(
! is_wp_error( $test )
&& isset( $test['http_response'] )
&& $test['http_response'] instanceof \WP_HTTP_Requests_Response
&& method_exists( $test['http_response'], 'get_response_object' )
)
echo $test['http_response']->get_response_object()->url;
Related Posts:
- How to run multiple Async HTTP requests in WordPress?
- API JSON Data in WordPress
- wp_remote_post empty $_POST
- Using the wp_remote_post response body
- Why is this specific API request failing when sending via wp_remote_post?
- How to declare a global variable in php?
- Undefined variable in functions.php file [closed]
- load/require specific php files for specific pages/templates/post types
- How to correct schedule my event weekly with wp_schedule_event()
- Execute a shortcode when clicking on a image
- get_the_content if it contains multiple lines it results in SyntaxError
- How can I add a class to a single menu item?
- Store loop into array
- How to enlarge the media file upload size in wordpress admin
- How do I hardcode a WordPress shortcode into my theme?
- Create table in database when activating plugin
- Implement a multi-value input field where the number of entries is not limited
- How can I export post data in xml format?
- Getting my head round WordPress filter
- allow user to select pages from dropdown in my plugin
- Export WordPress Table to CSV from page
- How to set a custom path, for ajax image upload folder in admin?
- Recent post display using shortcode
- Can I use `.phtml` instead of `.php`
- WP_cron won’t trigger my action
- how to save selection meta data in user profile on frontend
- How to get a list of all possible values of a specific user meta key?
- Use object in template part
- Can’t extend some core classes
- Create onClick Event to Re-load a Widget
- Output Buffering – Everything between wp_head and wp_print_footer_scripts?
- functions.php is being included twice, creating PHP fatal errors
- Hide Hamburger Menu On Specific Page (Front Page/Home Page)
- Accessing the database from a plugin outside of action hooks
- Menu Limitations
- Iterate through posts based on array of categories
- selected option if current category is the value
- Custom query, checking values of multiple meta keys
- Genesis framework comments broken?
- Change CSS based on is_user_logged_in
- How to hook code to show after the_content?
- Run a code only on theme activation only during first activation
- Shortcode from a function not working
- Creating WordPress Shortcode with Variable
- Catchable fatal error: Object of class stdClass could not be converted to string
- Get title attribute from galleries
- How to add text to the start of all comments?
- If else statement to check for thumbnail and whether or not it’s a mobile device – streamline
- variable value disappears in a second loop
- unknown issue in ‘header.php’ preventing theme from displaying fully
- Check If Post Was Published More Than 6 Months Ago Using get_the_date
- Compare $_POST returned values with term array
- random display categories – change url
- Display child page content of a specific parent on home page
- Generate responsive post thumbnails of same size
- Change out put of the_post_thumbnail in PHP
- Styling an “active” link outside of WordPress default menu
- WordPress permalink issue
- Any way to hide a blog posts text if it’s longer than let’s say 300 characters
- Show label for value only when value exists, basic php
- How to get woocommerce orders with get_posts method in a shortcode
- Counting number of posts in multiple (sub)categories using shortcode
- Display WordPress search results based on the selected Sub-Category
- how to make wordpress user submit form once?
- Update PHP version of WordPress (internal hosting)
- Where to add my PHP codes for AJAX Jquery to work?
- Display the list of user’s comments + the post title + date
- Multiple Tag Filtering
- Is it possible to change the get_posts() or wp_query() function to alter the results that are returned?
- How to optimize and reduce excessive database queries
- Need to show 7 posts from actual date
- How to reload a php script, using AJAX and jQuery
- Notice: Undefined variable
- Make wp_editor required
- Add the shortcodes from the enfold theme to the other theme
- PHP 7.2.18 | Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- I need to edit a widget, with no dashboard access
- Get the total Author Favorited posts
- How to properly create multiple conditions to redirect users roles to different pages
- unable to add category in creating post dynamically
- making a search.php query
- WordPress WPDB::insert 13th param is always blank (only if format)
- MySQL query in WordPress with AJAX
- enumerating custom taxonomies?
- Change colour of table td based on value
- WordPress styling recent post
- Headers Already Sent
- If or/and statement advanced custom fields [closed]
- Remove duplicates from foreach
- Determine if only one image attached to a post/page
- Add specific phrase after every product title including the discounted price? [closed]
- get_avatar from user id
- Remove Unused Menu Locations
- How do I change the Go To Categories link in the term_updated_messages
- wp_mail vs mail functions and header arrays
- get_query_vars always retruns empty value
- How to group by column a and sum column b and c in a php array
- Convert custom field date format to “WordPress default”
- Woocommerce Convert existing order to the cart
- Execute function when I click button