<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[http - get method - It does not send pairs name-value]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I am an accredited rookie ;-)</p>
<p dir="auto">When I try to send data through http, with the get method, it doesn't send the names and values pairs.</p>
<p dir="auto">UIflow with blocks:<br />
<img src="/assets/uploads/files/1580587604358-fba0daa1-709d-44d3-90cb-a8c1c9a73f2f-image-resized.png" alt="0_1580587604450_fba0daa1-709d-44d3-90cb-a8c1c9a73f2f-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">When I look at the code, I don't see it send the string with the name and value pair.<br />
<img src="/assets/uploads/files/1580587570752-24d07e1c-3e64-4456-ac06-7f9982fede37-image-resized.png" alt="0_1580587570327_24d07e1c-3e64-4456-ac06-7f9982fede37-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">According to this web page, the program would have to send you the data arguments.<br />
<a href="https://makeblock-micropython-api.readthedocs.io/en/latest/public_library/Third-party-libraries/urequests.html#urequests.request" target="_blank" rel="noopener noreferrer nofollow ugc">https://makeblock-micropython-api.readthedocs.io/en/latest/public_library/Third-party-libraries/urequests.html#urequests.request</a><br />
I have tried to write by hand, without success.</p>
<p dir="auto"><strong>Have any of the readers succeeded, send data to a server via http?</strong></p>
<p dir="auto">This is the server code, written for node js, in case you want to try it at: <a href="https://repl.it/" target="_blank" rel="noopener noreferrer nofollow ugc">https://repl.it/</a> o en <a href="https://glitch.com/" target="_blank" rel="noopener noreferrer nofollow ugc">https://glitch.com/</a></p>
<pre><code>var http = require('http');
var url = require('url');

var x_gyr = 0.0;

/* https://echo-data-get-method-http-get.mariomoreno2020.repl.run/t.htm?x=15 */

http.createServer(function (req, res) {
  // Set CORS headers
	res.setHeader('Access-Control-Allow-Origin', '*');
	res.setHeader('Access-Control-Request-Method', '*');
	res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET, POST, PUT');
	res.setHeader('Access-Control-Allow-Headers', '*');
  res.statusCode = 200;
  //
  res.writeHead(200, {'Content-Type': 'text/html'});
  var q = url.parse(req.url, true);
  console.log(q.href);
  if (q.pathname == '/t.html') {
    q = q.query;
    x_gyr = q.x;
  }   
  var txt = 'x= ' + x_gyr;
  res.end(txt);
}).listen(8080);
</code></pre>
<p dir="auto">Remember that the http block, the url is <strong>'http' instead of 'https</strong>'.</p>
<p dir="auto">And if you want to try the UIFlow code, here is a download link. You can see how in the blocks it sends data and in the python code no.<br />
<a href="https://mega.nz/#!YY82UIrB!fskiB3YAn1hQH6rCcbwzjiuJO5-Fz0H4LBr6LZ4WtjI" target="_blank" rel="noopener noreferrer nofollow ugc">https://mega.nz/#!YY82UIrB!fskiB3YAn1hQH6rCcbwzjiuJO5-Fz0H4LBr6LZ4WtjI</a></p>
]]></description><link>https://community.m5stack.com/topic/1669/http-get-method-it-does-not-send-pairs-name-value</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 18:40:26 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1669.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 01 Feb 2020 20:20:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to http - get method - It does not send pairs name-value on Fri, 13 May 2022 12:38:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/uecken" aria-label="Profile: uecken">@<bdi>uecken</bdi></a> Replace the text box containing the URL with an <em>unescaped</em> text box. That way, the URL won't get truncated. See also this post: <a href="https://community.m5stack.com/topic/4281/http-get-query-parameters">HTTP GET query parameters</a></p>
]]></description><link>https://community.m5stack.com/post/17480</link><guid isPermaLink="true">https://community.m5stack.com/post/17480</guid><dc:creator><![CDATA[epollari]]></dc:creator><pubDate>Fri, 13 May 2022 12:38:08 GMT</pubDate></item><item><title><![CDATA[Reply to http - get method - It does not send pairs name-value on Sun, 24 Apr 2022 17:50:13 GMT]]></title><description><![CDATA[<p dir="auto">Try placing the map functions inside the conver to JSON blocks.</p>
]]></description><link>https://community.m5stack.com/post/17287</link><guid isPermaLink="true">https://community.m5stack.com/post/17287</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 24 Apr 2022 17:50:13 GMT</pubDate></item><item><title><![CDATA[Reply to http - get method - It does not send pairs name-value on Sun, 24 Apr 2022 09:32:22 GMT]]></title><description><![CDATA[<p dir="auto">I got same problem.<br />
Here is my UiFlow code and server console.<br />
<img src="/assets/uploads/files/1650792705619-1c6db5e0-35d5-446b-ac50-fc34b85aff8e-image-resized.png" alt="0_1650792706711_1c6db5e0-35d5-446b-ac50-fc34b85aff8e-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/17286</link><guid isPermaLink="true">https://community.m5stack.com/post/17286</guid><dc:creator><![CDATA[uecken]]></dc:creator><pubDate>Sun, 24 Apr 2022 09:32:22 GMT</pubDate></item></channel></rss>