<div dir="ltr"><div class="gmail_default" style="font-size:small">Woohoo, what does he win Jonny'O!</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Ron</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 1, 2018 at 5:45 PM tim Rowledge <<a href="mailto:tim@rowledge.org">tim@rowledge.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yay! Winner!<br>
<br>
> On 2018-10-01, at 2:30 PM, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" target="_blank">leves@caesar.elte.hu</a>> wrote:<br>
> <br>
> On Mon, 1 Oct 2018, tim Rowledge wrote:<br>
> <br>
>> <br>
>> I suspect I can make up a way to do a more direct use-auth-first-time approach that might be better when you know it has to have it. After my frog pills...<br>
> <br>
> Yes you can. You just have to add the Authorization header yourself. Adding basic auth manually to the example in help would look something like this:<br>
> <br>
>       | client username password response |<br>
>       client := WebClient new.<br>
>       username := 'Tim'.<br>
>       password := 'secret'.<br>
>       response := client httpGet: '<a href="http://www.squeak.org/protected" rel="noreferrer" target="_blank">http://www.squeak.org/protected</a>' do: [ :request |<br>
>               request headerAt: 'Authorization' put: 'Basic ', (username, ':', password) base64Encoded ].<br>
>       response content. "Prefetch response body before closing the client."<br>
>       client close. "Do not let WebClient instances leak external semaphores."<br>
>       ^response<br>
<br>
I saw the httpGet:do: but hadn't a clue how to assemble the header bit. Thank you!<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Law of Logical Argument: Anything is possible if you don't know what you are talking about.<br>
<br>
<br>
<br>
<br>
</blockquote></div></div>