Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP8266WiFi examples - 'traditional' WiFiWebClient example #6536

Open
wants to merge 3 commits into
base: master
from

Conversation

@jandrassy
Copy link
Contributor

commented Sep 19, 2019

some commits last year modified the WiFiClient example to a non HTTP example.

The (WiFi)WebClient example started in Arduino Ethernet library and most Arduino networking libraries have some modification of it. I modified the version from WiFiNINA library for ESP8266WiFi and used my favourite test address, the Arduino ASCII logo because it is readable on Serial Monitor.

jandrassy referenced this pull request Sep 19, 2019
WiFiClient no longer depends on now-defunct data.sparkfun.com
service, but uses a TCP "quote of the day" service instead.

fixes #4088
@d-a-v

This comment has been minimized.

Copy link
Collaborator

commented Sep 19, 2019

If you are using unix or WSL, you can run the script tests/restyle.sh which will solve the CI 'style check' issue.
Also, like in all other examples, you can use this for SSID and PSK:

#ifndef STASSID
#define STASSID "your-ssid"
#define STAPSK  "your-password"
#endif

const char* ssid = STASSID;
const char* pass = STAPSK;
@jandrassy jandrassy force-pushed the jandrassy:master branch from cd2451c to b220f38 Sep 20, 2019
@jandrassy

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2019

@d-a-v, I changed the ssid and pass definition and run the restyle (it changed only spaces in the header comment)

@d-a-v
d-a-v approved these changes Sep 20, 2019
Copy link
Collaborator

left a comment

Thanks for the example, but the HTTP version of the example was replaced with a plain TCP service example on purpose, after consultation with @igrr and the team.

The reasoning behind it was that a) this example is very brittle and not the preferred way to handle real HTTP on the 8266 (because we have a real HTTP client class) and b) users were cut-n-pasting the example for their own HTTP apps and ending up with problems due to its brittleness.

Given that history, I'm personally against having a roll-your-own simple HTTP example. Users are free to do it themselves, but we don't have to encourage them.

@jandrassy

This comment has been minimized.

Copy link
Contributor Author

commented Sep 20, 2019

and the HTTPSRequest example?
with every library I use WebClient example as basic test of connectivity

@earlephilhower

This comment has been minimized.

Copy link
Collaborator

commented Sep 20, 2019

Good point! Probably worth reworking to a TLS web service and not HTTP. Or using the HTTP requester with a HTTPS client, but I think we already have one of those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.