Hello Andreas,<div><br></div><div>Yes, it works fine. Thanks.</div><div><br></div><div>But now a request for another feature :-) AWS sometimes sends responses back with &#39;HTTP/1.1 307 Temporary Redirect&#39;. I see that 301 and 302 redirects are handled automatically. Can you add support for a 307 redirect as well?</div>
<div><br></div><div>Jan.</div><div><br></div><div><br><br><div class="gmail_quote">On Tue, Aug 10, 2010 at 7:17 AM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Jan -<br>
<br>
This should be fixed in the latest version. All requests can now optionally take encoded URL strings. Give it a shot and let me know if it works for you.<br>
<br>
Hope this helps,<br><font color="#888888">
  - Andreas</font><div><div></div><div class="h5"><br>
<br>
On 8/9/2010 7:32 AM, Jan van de Sandt wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I am busy updating the CloudforkAWS code to use WebClient as a the HTTP<br>
client. CloudforkAWS provides a Smalltalk API to the Amazon AWS REST<br>
services.<br>
<br>
WebClient works really well, the not so common HTTP methods like HEAD,<br>
DELETE and PUT that the Simple Storage Service (S3) require work without<br>
any problems :-)<br>
<br>
There is only one small problem. The WebClient&gt;&gt;httpGet:do: method<br>
always encodes the urlString. In my situation the url is already encoded<br>
and encoding it a second time leads to errors. In my code I encode the<br>
individual query parameters names and values before I compose the<br>
complete url. If you have a parameters like this I think it is the only<br>
correct way:<br>
<br>
param1=you&amp;me<br>
param2=coming for dinner?<br>
<br>
So I added the following methods to WebClient:<br>
<br>
httpGet: urlString encoded: isEncoded do: aBlock<br>
&quot;GET the response from the given url&quot;<br>
| request |<br>
self initializeFromUrl: urlString.<br>
request := self requestWithUrl: urlString encoded: isEncoded.<br>
request method: &#39;GET&#39;.<br>
userAgent ifNotNil:[request headerAt: &#39;User-Agent&#39; put: userAgent].<br>
aBlock value: request.<br>
^self sendRequest: request<br>
<br>
and:<br>
<br>
requestWithUrl: urlString encoded: isEncoded<br>
&quot;Create an return a new WebRequest initialized with the given url.<br>
Subclasses can use this method to override the default request class.&quot;<br>
<br>
^WebRequest new initializeFromUrl: urlString encoded: isEncoded.<br>
<br>
It would be great if these methods are incorporated in the base package.<br>
<br>
Jan.<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br>
</div>