WP HTTP API and slashes (and caching!) #2

Merged
merged 2 commits into from Feb 8, 2012

Conversation

Projects
None yet
2 participants
@simonwheatley
Contributor

simonwheatley commented Feb 8, 2012

Hi Saul & Simon,

After some fun with a cURL bug (related to how WP handles cURL) I've converted the HTTP Request kit to use the WordPress HTTP API. Also some tweaks to how slashes. Also caching in the WP transients API, for five minutes. Hope it works for you and you find it useful. :)

Cheers,

Simon

Now copes with:

  • [govuk url="student-finance-calculator"]
  • [govuk url="/student-finance-calculator/"]
  • [govuk url="https://www.gov.uk/student-finance-calculator"]

Also now using the WordPress HTTP API, e.g. wp_remote_request, which
provides HTTP via a variety of transport mechanisms (e.g. if cURL isn't
present, it falls back to other mechanisms).

Simon Wheatley added some commits Feb 8, 2012

Simon Wheatley
Now uses WP HTTP API, also copes with more URL configurations
Now copes with:
* [govuk url="student-finance-calculator"]
* [govuk url="/student-finance-calculator/"]
* [govuk url="https://www.gov.uk/student-finance-calculator"]

Also now using the WordPress HTTP API, e.g. `wp_remote_request`, which
provides HTTP via a variety of transport mechanisms (e.g. if cURL isn't
present, it falls back to other mechanisms).
Simon Wheatley
Caching!
Note the notes about how we are caching POST requests in some cases, my
view is that this is fine (at least with the current generic decision
trees) as the information is non-personalised… even if it was, caching
is still of benefit to prevent load on the server from hanging around
while we wait for (even quick, as they are) remote HTTP requests to
gov.uk.

saulcozens added a commit that referenced this pull request Feb 8, 2012

Merge pull request #2 from simonwheatley/master
WP HTTP API and slashes (and caching!)

@saulcozens saulcozens merged commit c6efe5b into saulcozens:master Feb 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment