<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ludicrous &#187; HTTP</title>
	<atom:link href="/tag/http/feed" rel="self" type="application/rss+xml" />
	<link>https://lud.icro.us</link>
	<description></description>
	<lastBuildDate>Thu, 25 Apr 2013 01:15:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6-RC1-24704</generator>
		<item>
		<title>Access Your Desktop Development Environment from Your Mobile Device</title>
		<link>https://lud.icro.us/access-development-environment-from-mobile-device</link>
		<comments>https://lud.icro.us/access-development-environment-from-mobile-device#comments</comments>
		<pubDate>Thu, 23 Feb 2012 00:09:48 +0000</pubDate>
		<dc:creator>John Blackbourn</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[Utility]]></category>

		<guid isPermaLink="false">https://lud.icro.us/?p=274</guid>
		<description><![CDATA[It&#8217;s really easy to get an iPhone, iPad or other iOS device to access a local web server running on your development machine. All you need is Charles Proxy running on your development machine (which you should have anyway, as it&#8217;s invaluable). Once that&#8217;s running: Make sure your iOS device is connected to the same [&#8230;]]]></description>
				<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "https://lud.icro.us/access-development-environment-from-mobile-device", "Access Your Desktop Development Environment from Your Mobile Device", "" );
		//--></script></span><p>It&#8217;s really easy to get an iPhone, iPad or other iOS device to access a local web server running on your development machine. All you need is <a href="http://www.charlesproxy.com/">Charles Proxy</a> running on your development machine (which you should have anyway, as it&#8217;s invaluable). Once that&#8217;s running:</p>
<p>Make sure your iOS device is connected to the same network as your development machine. Go into the <strong>Settings -> Wi-Fi</strong> menu on your iOS device and click the arrow next to your network. From there switch the HTTP proxy setting to manual and enter your development environment machine&#8217;s network IP address (eg. 192.168.0.4) as the server, and 8888 as the port (Charles&#8217; default port unless you&#8217;ve changed it).</p>
<p>Voila. All your HTTP traffic from your iOS device will now route through Charles running on your desktop (Charles will prompt you to allow access first) and you&#8217;ll have access to your local development server. Awesome!</p>
<p><strong>Aside:</strong> Android users, you&#8217;ve not got it as easy. There aren&#8217;t any HTTP proxy settings in Android (who said Android was an open platform?) so unless you&#8217;re willing to jailbreak your Android you&#8217;re out of luck. There may well be similar proxy settings for other mobile OSes. A quick Google will usually give you the answer.</p>
<p><strong>Pro Tip:</strong> Are you still editing your hosts file in order to manage the host name mapping for sites on your development environment? Stop it. Just use the <strong>Tools -> DNS Spoofing</strong> menu in Charles and make life easier for yourself.</p>
]]></content:encoded>
			<wfw:commentRss>https://lud.icro.us/access-development-environment-from-mobile-device/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic Authentication with the WordPress HTTP API</title>
		<link>https://lud.icro.us/wordpress-http-api-basicauth</link>
		<comments>https://lud.icro.us/wordpress-http-api-basicauth#comments</comments>
		<pubDate>Tue, 10 Aug 2010 17:36:57 +0000</pubDate>
		<dc:creator>John Blackbourn</dc:creator>
				<category><![CDATA[Default]]></category>
		<category><![CDATA[BasicAuth]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">https://lud.icro.us/?p=239</guid>
		<description><![CDATA[Basic Authentication (or BasicAuth) is not natively handled with the WordPress HTTP API. This means when you&#8217;re using functions such as wp_remote_get() and wp_remote_post() there&#8217;s no immediately obvious way to send Basic Authentication headers with your request. It would be great to pass username and password parameters to these functions, but it&#8217;s not there. Fear [&#8230;]]]></description>
				<content:encoded><![CDATA[<span class="read_later"><script type="text/javascript"><!--
			instapaper_embed( "https://lud.icro.us/wordpress-http-api-basicauth", "Basic Authentication with the WordPress HTTP API", "" );
		//--></script></span><p>Basic Authentication (or BasicAuth) is not natively handled with the <a href="http://codex.wordpress.org/HTTP_API">WordPress HTTP API</a>. This means when you&#8217;re using functions such as <code>wp_remote_get()</code> and <code>wp_remote_post()</code> there&#8217;s no immediately obvious way to send Basic Authentication headers with your request. It would be great to pass username and password parameters to these functions, but it&#8217;s not there.</p>
<p>Fear not though, it&#8217;s really easy. Here&#8217;s how:<br />
<code><br />
$args = array(<br />
  'headers' => array(<br />
    'Authorization' => 'Basic ' . base64_encode( YOUR_USERNAME . ':' . YOUR_PASSWORD )<br />
 )<br />
);<br />
wp_remote_request( $url, $args );<br />
</code></p>
<p>That&#8217;s it. The correct authentication headers will then be sent with your request (after you&#8217;ve replaced YOUR_USERNAME and YOUR_PASSWORD with the obvious).</p>
<p>I&#8217;d like to give a quick shout out to my favourite HTTP monitor <a href="http://www.charlesproxy.com/">Charles Proxy</a>. I use Charles almost daily when dealing with server-side HTTP requests and AJAX requests and it makes life much easier. I love it.</p>
]]></content:encoded>
			<wfw:commentRss>https://lud.icro.us/wordpress-http-api-basicauth/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
