<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/20139" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2016-04-07T09:21:16-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/20139</id>

		<entry>
		<author><name><![CDATA[MenzAgitat]]></name></author>
		<updated>2016-04-07T09:21:16-04:00</updated>

		<published>2016-04-07T09:21:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104908#p104908</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104908#p104908"/>
		<title type="html"><![CDATA[[solved] No data returned when requesting content from https]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104908#p104908"><![CDATA[
Hello,<br><br>I'm trying to make a translator using the Yandex API at <a href="https://translate.yandex.net/api/" class="postlink">https://translate.yandex.net/api/</a> and I'm encountering some difficulties.<br><br>Here is what I am doing :<div class="codebox"><p>Code: </p><pre><code>.tcl ::http::register https 443 ::tls::socketTcl: 443 ::tls::socket.tcl ::http::geturl "https://translate.yandex.net/api/v1.5/tr.json/translate?key=MY_API_KEY&amp;text=this%20is%20a%20test&amp;lang=fr&amp;format=plain&amp;options=1" -timeout 10000Tcl: ::http::6242.tcl http::status ::http::6242Tcl: ok.tcl ::http::data ::http::6242Tcl: .tcl array get ::http::6242Tcl: sock sock8 http {} querylength 0 -queryblocksize 8192 state connecting charset iso8859-1 type text/html -binary 1 url https://translate.yandex.net/api/v1.5/tr.json/translate?key=MY_API_KEY&amp;text=this%20is%20a%20test&amp;lang=fr&amp;format=plain&amp;options=1 -keepalive 0 -timeout 10000 socketinfo translate.yandex.net:443 queryoffset 0 binary 0 -strict 1 totalsize 0 -validate 0 -protocol 1.1 connection close -queryprogress {} -headers {} after after#40937 -blocksize 8192 coding {} status ok body {} currentsize 0 meta {} -type application/x-www-form-urlencoded</code></pre></div>I replaced my own API key by MY_API_KEY in the example, but you can obtain one freely here : <a href="https://tech.yandex.com/key/form.xml?service=trnsl" class="postlink">https://tech.yandex.com/key/form.xml?service=trnsl</a><br><br>As you can see, geturl returns the "ok" status but I get no data.<br><br>Tests have been made using :<br>Eggdrop v1.6.21 / Tcl 8.5.3 / http package 2.7.5 / tls package 1.50<br><br>Any idea would be greatly appreciated.<br><br><br>Edit : Problem solved, adding -tls1 1 to ::tls::socket parameters did the trick.<br> <p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7933">MenzAgitat</a> — Thu Apr 07, 2016 9:21 am</p><hr />
]]></content>
	</entry>
	</feed>
