Nil return from Web Server

I’m still trying to get to grips with \ and searches but now have a more fundamental problem. Nothing being returned by the web server. I’ve adapted Simon Monk’s “sketch_12_03_web_request” to my MAC and target web server, added monitor prints to try to see what’s going on, and pinched some ideas from the Forum specifically “Using Ethernet Shield to read text from a web page Jul 22, 2012, 08:44 pm”.
Here’s my code:

// Test of GetWeatherData function based upon
// sketch_12_03_web_request

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0E, 0x9B, 0xAA };//MAC address from my Ethernet shield

EthernetClient client;

void setup() 
  while (!Serial){}; // for Leonardo compatability

  if (! Ethernet.begin(mac)) 
    Serial.println("Could not connect to network");
  Serial.println("Connected to Network");

void loop() 

void GetWeatherData()
  if (client.connect("", 80))
    Serial.println("Connected to");
    client.println("GET HTTP/1.0");
    Serial.println("GETting data");
    while (client.connected())
      Serial.println("Client is still connected.");
      if (client.available())
        char clientReturn =;
        client.findUntil("W\":\"", "\0");
        Serial.println("Finding until \"W\".");
        String weatherType = client.readStringUntil('\r');
      Serial.println("Client unavailable.");
    if (!client.connected()) Serial.println("Client disconnected.");

and the Monitor output

Connected to Network
Connected to
GETting data
Client disconnected.

Is there something wrong in the coding that I’m not seeing? Is the difference between Simon and DPac’s use of Setup() and Loop() of any significance? Or should I be looking elswhere for assistance?

Or is the clue in here in the Headers tab in the response in Firefox to the request?

Response Headers

Access-Control-Allow-Origin *
Cache-Control public, no-transform, must-revalidate, max-age=3400
Connection keep-alive
Content-Encoding gzip
Content-Length 704
Content-Type application/json
Date Wed, 11 Jul 2018 20:43:18 GMT
ETag 1531341798728
Expires Wed, 11 Jul 2018 21:39:58 GMT
Server WaveServer 1.0
Vary Accept-Encoding
WebServer -PROD-01

Request Headers

Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-GB,en;q=0.5
Cache-Control max-age=0
Connection keep-alive
Cookie _ga=GA1.3.865629209.1494395890; __gads=ID=ce3c06bac300a509:T=1494395894:S=ALNI_Mb8PGopX4CT4OHNFhfADPZ10ylleg; WT_FPC=id=204c23b512cbc3895691494392443238:lv=1531036949464:ss=1531036817421; __qca=P0-1991991959-1529423782491
If-None-Match 1531287629206
Upgrade-Insecure-Requests 1
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0

If you need to see what the JSON raw data looks like, tell me how best to post it, as using code tags doesn’t work. It will only show the first line.

  if (client.connect("", 80))

The argument is the name of the server. The NAME of the server is NOT


    client.println("GET HTTP/1.0");

The protocol and server name are NOT part of the GET request.

OK. Looking at the examples from which I was trying to learn, one connects to "",
the other to "", then use the respective client.println commands:

client.println("GET HTTP/1.0");


client.println("GET /data/2.5/weather?q=Manchester,uk HTTP/1.0");

Now to access the JSON output from the UK Met Office in Firefox I must use the whole URL as shown in the GET from my code in the previous post. Hence my confusion over which part of that is the server name (its not - that site does not exist) and what is needed in the GET (the first example I quote started out without the HTTP, but it had to be added to get the server to understand the GET according to the original Forum posts. I guess I'll just have to fiddle around until I manage to make something work, but I'd really prefer properly to understand what the commands and the servers need and expect. The two code snippets above aren't helping with that. Anyway I'll follow your suggestions first and see what happens.

Now to access the JSON output from the UK Met Office in Firefox I must use the whole URL as shown in the GET from my code in the previous post.

Nonsense. If that WAS the case, it would be working. Since it isn't, then it is perfectly obvious that you are wrong.