Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: base/net/web-net-query.c
- Revision:
- 147:ea6f647725a1
- Parent:
- 131:a9793a9721c7
- Child:
- 153:eaee18d970c4
diff -r 6bc151bd7063 -r ea6f647725a1 base/net/web-net-query.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/base/net/web-net-query.c Sun Jan 10 11:53:12 2021 +0000
@@ -0,0 +1,29 @@
+#include <string.h>
+
+#include "http.h"
+#include "nr.h"
+
+void WebNetQuery(char* pQuery)
+{
+ while (pQuery)
+ {
+ char* pName;
+ char* pValue;
+ pQuery = HttpQuerySplit(pQuery, &pName, &pValue);
+ int value = HttpQueryValueAsInt(pValue);
+
+ if (HttpSameStr(pName, "name-to-resolve"))
+ {
+ strncpy(NrTest, pValue, NR_NAME_MAX_LENGTH);
+ }
+ if (HttpSameStr(pName, "request-AAAA"))
+ {
+ NrMakeRequestForAddress6FromName(NrTest);
+ }
+ if (HttpSameStr(pName, "request-A"))
+ {
+ NrMakeRequestForAddress4FromName(NrTest);
+ }
+ }
+}
+