Wificlient - how to request the mobile version of a website

Hi,

I am using WiFiClientSecure in a ESP32 Arduino project to get the content of a webpage and parse for some value in it. In general it works fine, but the website is quite big and the mobile version of the website would also contain all needed data and is much smaller.

So here is my question. How can I request for the mobile version of the webpage?

My current code to request the website basically looks like this:

const char *p_host = "website.com";
const String p_link = "/some/thing";
httpsClient.print(String("GET ") + p_link + " HTTP/1.1\r\n" +
                      "Host: " + p_host + "\r\n" +
                      "Connection: close\r\n\r\n");

thanks for your replies

I believe the "user-agent" is what the website uses to learn if you are a mobile browser.
There is some information on that here https://en.wikipedia.org/wiki/User_agent

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.