<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Rails, Flex, as3httpclientlib &#8211; Give Up Hope!</title>
	<atom:link href="http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/</link>
	<description>Late nights eventually pay off</description>
	<lastBuildDate>Wed, 08 Feb 2012 19:15:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Ben</title>
		<link>http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/#comment-3532</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 09 Sep 2010 21:07:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.aisleten.com/?p=338#comment-3532</guid>
		<description>&quot;So, except in certain specific cases, using the URLLoader means that your Rails sessions just work. Not so with the as3httpclientlib.&quot;

This is inaccurate.  I got my application to maintain multiple sessions with my rails server at once.  You simply need to save your session id (s) upon login to your server, and then you pass them back in using the as3httpclientlib add header option.  

You use something like this on the Flex side:
var client = new HttpClient();
var request = new Get();
request.addHeader(&quot;Cookie&quot;, &quot;_application_session_id=&quot; + {session_id});
var uri:URI = new URI(http://rails_server_address);
client.request(uri,request);

And on the Rails side, you need to make sure that your _application_session_id matches up with what you&#039;re using on the flex side.  You do this by putting a line in your application.rb as such:

session :session_key =&gt; &#039;_application_session_id&#039;

I did this on a rails 1.2.6 server, but I&#039;m guessing there&#039;s probably a similar way to do it with rails 2 as well because you have multiple options on how to manage sessions on it.</description>
		<content:encoded><![CDATA[<p>&#8220;So, except in certain specific cases, using the URLLoader means that your Rails sessions just work. Not so with the as3httpclientlib.&#8221;</p>
<p>This is inaccurate.  I got my application to maintain multiple sessions with my rails server at once.  You simply need to save your session id (s) upon login to your server, and then you pass them back in using the as3httpclientlib add header option.  </p>
<p>You use something like this on the Flex side:<br />
var client = new HttpClient();<br />
var request = new Get();<br />
request.addHeader(&#8220;Cookie&#8221;, &#8220;_application_session_id=&#8221; + {session_id});<br />
var uri:URI = new URI(http://rails_server_address);<br />
client.request(uri,request);</p>
<p>And on the Rails side, you need to make sure that your _application_session_id matches up with what you&#8217;re using on the flex side.  You do this by putting a line in your application.rb as such:</p>
<p>session :session_key =&gt; &#8216;_application_session_id&#8217;</p>
<p>I did this on a rails 1.2.6 server, but I&#8217;m guessing there&#8217;s probably a similar way to do it with rails 2 as well because you have multiple options on how to manage sessions on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Digvjay</title>
		<link>http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/#comment-2713</link>
		<dc:creator>Digvjay</dc:creator>
		<pubDate>Wed, 13 May 2009 19:08:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.aisleten.com/?p=338#comment-2713</guid>
		<description>Micah, 
With as3httpClienLib, you can access the response headers including cookies and set the cookies back to out going requests. It&#039;s a little overhead to copy the cookies from response and setting back to request but it&#039;s doable.

Digvijay</description>
		<content:encoded><![CDATA[<p>Micah,<br />
With as3httpClienLib, you can access the response headers including cookies and set the cookies back to out going requests. It&#8217;s a little overhead to copy the cookies from response and setting back to request but it&#8217;s doable.</p>
<p>Digvijay</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maxwell</title>
		<link>http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/#comment-2577</link>
		<dc:creator>Maxwell</dc:creator>
		<pubDate>Sun, 18 Jan 2009 21:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.aisleten.com/?p=338#comment-2577</guid>
		<description>Arg.  I was hoping that you had figured out how to make it work.  Though, if it&#039;s just sessions management, there might be SOME cases where we can use it. 

Also, yeah, we should check out Ruboss, though I&#039;m unsure if they&#039;ve found a way to capture response headers.  Scott?</description>
		<content:encoded><![CDATA[<p>Arg.  I was hoping that you had figured out how to make it work.  Though, if it&#8217;s just sessions management, there might be SOME cases where we can use it. </p>
<p>Also, yeah, we should check out Ruboss, though I&#8217;m unsure if they&#8217;ve found a way to capture response headers.  Scott?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Patten</title>
		<link>http://blog.aisleten.com/2009/01/16/rails-flex-as3httpclientlib-give-up-hope/#comment-2575</link>
		<dc:creator>Scott Patten</dc:creator>
		<pubDate>Sat, 17 Jan 2009 05:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.aisleten.com/?p=338#comment-2575</guid>
		<description>Hey Micah,

If you&#039;re looking for RESTful Flex frameworks, you might want to check out Ruboss (http://ruboss.com).  We&#039;ve done a lot of work making it integrate nicely with Rails and the RESTful interface.  

Check out the tutorial, which gets a Ruboss Flex/Rails app up and running in just a few minutes: http://wiki.github.com/ruboss/ruboss4ruby/ruboss-framework-and-rails-21

Scott</description>
		<content:encoded><![CDATA[<p>Hey Micah,</p>
<p>If you&#8217;re looking for RESTful Flex frameworks, you might want to check out Ruboss (<a href="http://ruboss.com" rel="nofollow">http://ruboss.com</a>).  We&#8217;ve done a lot of work making it integrate nicely with Rails and the RESTful interface.  </p>
<p>Check out the tutorial, which gets a Ruboss Flex/Rails app up and running in just a few minutes: <a href="http://wiki.github.com/ruboss/ruboss4ruby/ruboss-framework-and-rails-21" rel="nofollow">http://wiki.github.com/ruboss/ruboss4ruby/ruboss-framework-and-rails-21</a></p>
<p>Scott</p>
]]></content:encoded>
	</item>
</channel>
</rss>

