Why you should want to know about the WordPress HTTP API? Well, some WordPress installs may have CURL installed for instance, others may not. On some installs you're allowed to do file_get_contents to external URLs, on others you're not. If you're relying on these features to work, your plugin might not work for a lot of users. That's where the WordPress HTTP API comes in. It allows you to either GET or POST something from or to other sites outside of your WordPress site.
The WordPress HTTP API makes fetching from or posting to remote servers a breeze. It does this by allowing you to be transport agnostic when you fetch or post something. The HTTP API will choose the fastest and most reliable method out of the five different transports available in PHP. It'll take care of discovering what transports are allowed on that server at that time.
Comments
Be the first to write a comment
You must me logged in to write a comment.