Just a quick post with some tips for troubleshooting and testing HTTP requests. For example, if you have a plugin that sends requests behind the scenes via Ajax or cURL or whatever, it’s nice to have a way to view request details such as headers, the response, and everything in between. This article is aimed primarily at WordPress users, but contains more general tips and tricks as well.

Use Core Control to track requests

Perhaps the best way to look at HTTP requests happening on WordPress sites is to install Core Control and activate the “HTTP Logging Module”. Then repeat whatever HTTP requests need made and revisit the plugin’s logging screen, which breaks everything down: URL, method, result, time, user agent, headers, cookies, and much more (see screenshots). Core Control is one of my favorite plugins to play with 🙂

[ WP Plugin: Core Control ]
Core Control plugin with its HTTP Logger Module activated

[ WP Plugin: Core Control - HTTP Module ]
Core Control’s HTTP Logger shows results

To iilustrate the usefulness of the HTTP logging module, here are the logged details of a phone-home to WordPress.org:

URL	https://api.wordpress.org/core/version-check/1.7/?version=3.8.1&php=5.3.5&locale=en_US&mysql=5.1.54&local_package=&blogs=1&users=1&multisite_enabled=0
Method	POST
Result	200 OK
Time Taken	0.30910992622375 seconds
HTTP Args	
timeout	(integer) 3
redirection	(integer) 5
httpversion	(string) 1.0
user-agent	(string) WordPress/3.8.1; http://example.com/
reject_unsafe_urls	(boolean) false
blocking	(boolean) true
headers	
Array
(
    [wp_install] => http://example.com/
    [wp_blog] => http://example.com/
)
cookies	
Array
(
)
compress	(boolean) false
decompress	(boolean) true
sslverify	(boolean) true
sslcertificates	(string) /var/www/example.com/wordpress/wp-includes/certificates/ca-bundle.crt
stream	(boolean) false
filename	NULL
limit_response_size	NULL
HTTP POST body	
Array
(
    [translations] => []
)
HTTP Transports	WP_HTTP_curl
Request Time	2014-02-07 00:23:40 --800

Those data are available for each logged HTTP request. As an older WP plugin, Core Control’s settings/logging screens appear a bit confusing (the WP Admin Area has changed significantly in the past two years), but all the data is available by first clicking on any logged request to toggle open more data. From there, you have three sub-screens available: “Request Details”, “Response Headers”, and “Response Body”, each with its own plethora of juicy HTTP infos.

Core Control includes numerous other modules as well so feel free to experiment and learn stuff. Also, this is one of those awesome plugins that hasn’t been updated in over two years, so visiting its page in the Plugin Directory you’ll see that yellow warning banner. But don’t let that scare you — the plugin works just as good today as it did over two years ago. It’s just a solid plugin that’s super-useful.

Perform a traceroute from the server

This method is a bit more advanced, requiring SSH connect to the server. Once connected, perform a traceroute to the target URL(s) using the following command:

traceroute example.com

The resulting traceroute will then reveal at exactly which point the HTTP request is failing (or not). The key here is that you’re making the request from the server, not your local machine. If needed, ask your web host for help with connecting via SSH. Or for more explanation, check out this post at WP-Mix.

Examine your server logs

If all else fails, examine your server’s access and error logs. They provide a wealth of data regarding many details of each request and/or error. As I explain in .htaccess made easy, HTTP investigations frequently begin and end with the server access and error logs.

Ask your host

Some hosts are better than others with providing help. So another thing that could be useful or provide some clues is to ask your host to look into whatever HTTP issue you’re dealing with, and/or if they have resources available that would be useful.

No Comments
Comments to: Testing HTTP Requests

Recent Articles

Good Reads

āϏāĻŽā§āĻĻā§āϰ āĻŽāĻžāύ⧇āχ āĻāĻ• āĻ…āύāĻ¨ā§āϤ āĻŦāĻŋāĻ¸ā§āϤāĻžāϰ, āϝ⧇āĻ–āĻžāύ⧇ āφāĻ•āĻžāĻļ āφāϰ āϜāϞ āĻāĻ• āĻšāϝāĻŧ⧇ āϝāĻžāϝāĻŧāĨ¤ āĻĸ⧇āωāϝāĻŧ⧇āϰ āĻļāĻŦā§āĻĻ⧇ āϞ⧁āĻ•āĻŋāϝāĻŧ⧇ āĻĨāĻžāϕ⧇ āĻšāĻžāϜāĻžāϰ⧋ āĻ…āύ⧁āĻ­ā§‚āϤāĻŋ—āĻ•āĻ–āύāĻ“ āĻļāĻžāĻ¨ā§āϤāĻŋ, āĻ•āĻ–āύāĻ“ āωāĻšā§āĻ›ā§āĻŦāĻžāϏ, āφāĻŦāĻžāϰ āĻ•āĻ–āύāĻ“ āĻāĻ•āĻžāϕ⧀āĻ¤ā§āĻŦāĨ¤ āĻāχ āϏ⧌āĻ¨ā§āĻĻāĻ°ā§āϝāϕ⧇ āύāĻŋāĻœā§‡āϰ āĻŽāϤ⧋ āĻ•āϰ⧇ āĻĒā§āϰāĻ•āĻžāĻļ āĻ•āϰāϤ⧇ āφāĻŽāϰāĻž āĻĒā§āϰāĻžāϝāĻŧāχ āϖ⧁āρāϜāĻŋ āωāĻĒāϝ⧁āĻ•ā§āϤ āĻļāĻŦā§āĻĻ, āĻŦāĻŋāĻļ⧇āώ āĻ•āϰ⧇ āϏ⧋āĻļā§āϝāĻžāϞ āĻŽāĻŋāĻĄāĻŋāϝāĻŧāĻžāϝāĻŧ āĻ›āĻŦāĻŋ āĻļ⧇āϝāĻŧāĻžāϰ āĻ•āϰāĻžāϰ āϏāĻŽāϝāĻŧāĨ¤ āϤāĻžāχ āĻāĻ•āϟāĻŋ āϏ⧁āĻ¨ā§āĻĻāϰ āϏāĻŽā§āĻĻā§āϰ āύāĻŋāϝāĻŧ⧇ āĻ•ā§āϝāĻžāĻĒāĻļāύ āĻļ⧁āϧ⧁ āĻāĻ•āϟāĻŋ āĻŦāĻžāĻ•ā§āϝ āύāϝāĻŧ, āĻŦāϰāĻ‚ […]
The Indian digital entertainment industry has experienced rapid growth over the past few years, with web series becoming a dominant form of storytelling. Among the many titles that have captured audience attention, the babuji web series stands out for its bold narrative, dramatic storytelling, and exploration of complex human relationships. Platforms like ULLU App have […]

Worlwide

Overview VipsPM – Project Management Suite is a Powerful web-based Application. VipsPM is a perfect tool to fulfill all your project management needs like managing Projects, Tasks, Defects, Incidents, Timesheets, Meetings, Appointments, Files, Documents, Users, Clients, Departments, ToDos, Project Planning, Holidays and Reports. It has simple yet efficient layout will make managing projects easier than […]
āϏāĻŽā§āĻĻā§āϰ āĻŽāĻžāύ⧇āχ āĻāĻ• āĻ…āύāĻ¨ā§āϤ āĻŦāĻŋāĻ¸ā§āϤāĻžāϰ, āϝ⧇āĻ–āĻžāύ⧇ āφāĻ•āĻžāĻļ āφāϰ āϜāϞ āĻāĻ• āĻšāϝāĻŧ⧇ āϝāĻžāϝāĻŧāĨ¤ āĻĸ⧇āωāϝāĻŧ⧇āϰ āĻļāĻŦā§āĻĻ⧇ āϞ⧁āĻ•āĻŋāϝāĻŧ⧇ āĻĨāĻžāϕ⧇ āĻšāĻžāϜāĻžāϰ⧋ āĻ…āύ⧁āĻ­ā§‚āϤāĻŋ—āĻ•āĻ–āύāĻ“ āĻļāĻžāĻ¨ā§āϤāĻŋ, āĻ•āĻ–āύāĻ“ āωāĻšā§āĻ›ā§āĻŦāĻžāϏ, āφāĻŦāĻžāϰ āĻ•āĻ–āύāĻ“ āĻāĻ•āĻžāϕ⧀āĻ¤ā§āĻŦāĨ¤ āĻāχ āϏ⧌āĻ¨ā§āĻĻāĻ°ā§āϝāϕ⧇ āύāĻŋāĻœā§‡āϰ āĻŽāϤ⧋ āĻ•āϰ⧇ āĻĒā§āϰāĻ•āĻžāĻļ āĻ•āϰāϤ⧇ āφāĻŽāϰāĻž āĻĒā§āϰāĻžāϝāĻŧāχ āϖ⧁āρāϜāĻŋ āωāĻĒāϝ⧁āĻ•ā§āϤ āĻļāĻŦā§āĻĻ, āĻŦāĻŋāĻļ⧇āώ āĻ•āϰ⧇ āϏ⧋āĻļā§āϝāĻžāϞ āĻŽāĻŋāĻĄāĻŋāϝāĻŧāĻžāϝāĻŧ āĻ›āĻŦāĻŋ āĻļ⧇āϝāĻŧāĻžāϰ āĻ•āϰāĻžāϰ āϏāĻŽāϝāĻŧāĨ¤ āϤāĻžāχ āĻāĻ•āϟāĻŋ āϏ⧁āĻ¨ā§āĻĻāϰ āϏāĻŽā§āĻĻā§āϰ āύāĻŋāϝāĻŧ⧇ āĻ•ā§āϝāĻžāĻĒāĻļāύ āĻļ⧁āϧ⧁ āĻāĻ•āϟāĻŋ āĻŦāĻžāĻ•ā§āϝ āύāϝāĻŧ, āĻŦāϰāĻ‚ […]
The Indian digital entertainment industry has experienced rapid growth over the past few years, with web series becoming a dominant form of storytelling. Among the many titles that have captured audience attention, the babuji web series stands out for its bold narrative, dramatic storytelling, and exploration of complex human relationships. Platforms like ULLU App have […]
āĻŦāĻ°ā§āϤāĻŽāĻžāύ āĻĄāĻŋāϜāĻŋāϟāĻžāϞ āϝ⧁āϗ⧇ āĻĢ⧇āϏāĻŦ⧁āĻ• āĻļ⧁āϧ⧁ āĻāĻ•āϟāĻŋ āϏ⧋āĻļā§āϝāĻžāϞ āĻŽāĻŋāĻĄāĻŋāϝāĻŧāĻž āĻĒā§āĻ˛ā§āϝāĻžāϟāĻĢāĻ°ā§āĻŽ āύāϝāĻŧ, āĻŦāϰāĻ‚ āĻāϟāĻŋ āφāĻŽāĻžāĻĻ⧇āϰ āĻŦā§āϝāĻ•ā§āϤāĻŋāĻ¤ā§āĻŦ, āϚāĻŋāĻ¨ā§āϤāĻžāĻ­āĻžāĻŦāύāĻž āĻāĻŦāĻ‚ āĻœā§€āĻŦāύāϧāĻžāϰāĻžāϰ āĻāĻ•āϟāĻŋ āĻĒā§āϰāϤāĻŋāĻĢāϞāύāĨ¤ āĻāĻ–āĻžāύ⧇ āĻĒā§āϰāĻĨāĻŽ āϝ⧇ āϜāĻŋāύāĻŋāϏāϟāĻŋ āĻ…āĻ¨ā§āϝāĻĻ⧇āϰ āύāϜāϰ⧇ āφāϏ⧇, āϤāĻž āĻšāϞ⧋ āφāĻĒāύāĻžāϰ āĻĒā§āϰ⧋āĻĢāĻžāχāϞ⧇āϰ āύāĻžāĻŽāĨ¤ āĻāĻ•āϟāĻŋ āϏ⧁āĻ¨ā§āĻĻāϰ, āχāωāύāĻŋāĻ• āĻāĻŦāĻ‚ āφāĻ•āĻ°ā§āώāĻŖā§€āϝāĻŧ āύāĻžāĻŽ āφāĻĒāύāĻžāϰ āĻĒā§āϰ⧋āĻĢāĻžāχāϞāϕ⧇ āĻ…āĻ¨ā§āϝāĻĻ⧇āϰ āĻĨ⧇āϕ⧇ āφāϞāĻžāĻĻāĻž āĻ•āϰ⧇ āϤ⧋āϞ⧇āĨ¤ āϤāĻžāχ āϏ⧁āĻ¨ā§āĻĻāϰ āϏ⧁āĻ¨ā§āĻĻāϰ āĻĢ⧇āϏāĻŦ⧁āĻ• āφāχāĻĄāĻŋāϰ āύāĻžāĻŽ āύāĻŋāĻ°ā§āĻŦāĻžāϚāύ āĻ•āϰāĻž āĻāĻ–āύ āĻ…āύ⧇āϕ⧇āϰ āϜāĻ¨ā§āϝāχ […]

Trending

Turquoise Jewelry is one of the ancient healing stones used for personal adornment and astrological benefits. The rare greenish blue-colored pectolite is celebrated for its enchanting powers among many crystal lovers. It is a hydrated phosphate of copper and aluminum that ranks 5 to 6 on the Mohs hardness scale. It is deemed a protective […]