user50790: I have a Nano+ENC28J60 and I'm using Pushingbox which I have setup to write data to a GoogleDrive spreadsheet which works perfectly at home. However when I take it to my workplace it no longer works. 
At work, serial tells me that the

Ethernet connection is good;
I get a client connection OK too.

However, [edit] even with 5 attempts at a response client.read(); it reports nothing at all. Serial shows 
OK connected! Written. Checking response: + + + + + 

I assume it is to do with some firewall or other restriction, but if I can get a connection that should be enough, no?
[edit] note: i have also tried connecting to port 443 instead of port 80 in case it was an HTTPS issue - same results, though]
How I can write to GDrive on my work network?
The code [edit#2 modified client.connect() to try 5 times and a response check via client.read() to try 5 times and Serial.print("+ "); each time] :
#include "DHTesp.h"
#include <SPI.h>
#include <UIPEthernet.h>

DHTesp dhtA; DHTesp dhtB;     

const int ledPin =  LED_BUILTIN;
int ledState = LOW;
int interval = 20; // this is the num seconds between reads (120=2mins) ***************************
int numReads = 2;   // Amount of reads between posting to Gdocs.  ***************************

byte mac[] = {0xAA, 0xF0, 0xDE, 0xDE, 0x06, 0xAF };  // Ethernet shield MAC addy
byte ip[] = { 10, 10, xx, yy };     
char devid [] = "vXXXXXXXXXXXXXXXX";  //  device ID from Pushingbox     

char server[] = "http://api.pushingbox.com";
EthernetClient client;

int c = '\0';

void setup()
{
  Serial.begin(9600);
  Serial.println ();

  Serial.print(F("dB_CoSdataV3.  Establishing..."));
  if (Ethernet.begin(mac) == 0) {
    Serial.println(F("Failed to configure ethernet"));

    //while (true); // no point in carrying on, so do nothing forevermore
  }
  else {
    Serial.println(F("Ethernet OK."));
    // print the Ethernet board/shield's IP address:
    Serial.print(F("local IP addy: "));
    Serial.println(Ethernet.localIP());
  }

  // give the Ethernet shield a second to initialize:
  delay(3000);

  Serial.println("____________________________________________");  Serial.println();

  dhtA.setup(3); //  sensor A
  dhtB.setup(4); //  sensor B
  //dhtC.setup(7); dhtD.setup(7);

  pinMode(ledPin, OUTPUT);

}

void loop(){

  int Ahumidity = 0;   int Atemperature = 0 ;
  int Bhumidity = 0;   int Btemperature = 0;

  int j = 0;
  for (j = 1; j <= numReads ; j++ ) {
    int p = 0;
    for (p = 1; p <= interval ; p++) {
      delay (1000);
      // if the LED is off turn it on and vice-versa:
      if (ledState == LOW) {        ledState = HIGH;       }
      else {        ledState = LOW;      }
      Serial.print (F("."));
      digitalWrite(ledPin, ledState);
    }

    Serial.print (" reading: ");
    Ahumidity += 10 * dhtA.getHumidity();  Atemperature += 10 * dhtA.getTemperature();
    Bhumidity += 10 * dhtB.getHumidity();  Btemperature += 10 * dhtB.getTemperature();

    Serial.print (j);     Serial.print (F("/"));     Serial.print (numReads);
    Serial.println();
  }

  Serial.print (F("Show the averaged val.s : "));
  Serial.print(F("\t\tA:")); Serial.print(Atemperature/(numReads)); Serial.print(F("\t")); Serial.print(Ahumidity/(numReads));
  Serial.print  (F("\tB:")); Serial.print(Btemperature/(numReads)); Serial.print(F("\t")); Serial.print(Bhumidity/(numReads));


  // now connect + write to Gdrive....................
  boolean connected;
  int counter1 = 0;
  do {
      connected = client.connect(server, 80);
      if (connected) { break; }
      client.stop();
      delay(1000);
      Serial.println("retry");
      counter1++;
  } while (!connected && counter1 <5);


//------------------
//if (client.connect(server, 80)) {

if (connected){
    Serial.println();
    Serial.print(F("OK connected! "));   

      String buf;

      buf += F("GET /pushingbox?devid=");
      buf += String(devid);

      buf += F("&tempA=");  buf += String(Atemperature/numReads);
      buf += F("&tempB=");  buf += String(Btemperature/numReads);
      buf += F("&tempC=0&tempD=0&tempE=0&tempF=0&tempG=0&tempH=0"); // null data needed

      buf += F("&humidA=");  buf += String (Ahumidity/numReads);
      buf += F("&humidB=");  buf += String (Bhumidity/numReads);
      buf += F("&humidC=0&humidD=0&humidE=0&humidF=0&humidG=0&humidH=0"); //null data needed



      buf += F("&submit=Submit");
      buf += F(" HTTP/1.1");
      //client.println(F("Host: api.pushingbox.com"));
      buf += F("Host: http://api.pushingbox.com"); // trying the addition of http://...
      buf += F("Connection: close\r\n");
      //client.println();

      client.print(buf);
      Serial.print(F(" Written. "));
      delay(1000);   
      int counter2 = 0;
      Serial.print ("Checking response: ");

      do {
          if (client.available()) {
              Serial.print("Y ");
              c = client.read();
              Serial.print((char)c);
          }         
          delay(2000);
          Serial.print("+ ");
          counter2++;
      } while (counter2 < 5);

      Serial.println ();       Serial.println ();
      //client.stop();     
  }


}


user37622: Your code for HTTP request has multiple issues.
After you connect to an HTTP server, it doesn't send anything until it receives your request. Your check for available bytes should always fail. Remove the if (client.available()) part, including the else part.
You make a POST request, but you put all parameters to URL and the request has no body. Change it to GET or put the parameters into request body and use "Content-type: application/x-www-form-urlencoded". Don't forget the Content-length parameter.
You send the request in very small parts. Every single print is send right away over network. Concatenate strings and print one or use buffered print.
And you should read the HTTP response and check the status. 

50790: <p>I have a Nano+ENC28J60 and I'm using Pushingbox which I have setup to write data to a GoogleDrive spreadsheet which works <em>perfectly</em> at home. However when I take it to my workplace it no longer works. </p>

<p>At work, serial tells me that the</p>

<ul>
<li>Ethernet connection is good;</li>
<li>I get a client connection OK too.</li>
</ul>

<p><em>However</em>, [edit] even with 5 attempts at a response client.read(); it reports nothing at all. Serial shows </p>

<pre><code>OK connected! Written. Checking response: + + + + + 
</code></pre>

<p>I assume it is to do with some firewall or other restriction, but if I can get a connection that should be enough, no?</p>

<p>[edit] note: i have also tried connecting to port 443 instead of port 80 in case it was an HTTPS issue - same results, though]</p>

<p><strong>How I can write to GDrive on my work network?</strong></p>

<p>The code [edit#2 modified client.connect() to try 5 times and a response check via client.read() to try 5 times and Serial.print("+ "); each time] :</p>

<pre><code>#include "DHTesp.h"
#include &lt;SPI.h&gt;
#include &lt;UIPEthernet.h&gt;

DHTesp dhtA; DHTesp dhtB;     

const int ledPin =  LED_BUILTIN;
int ledState = LOW;
int interval = 20; // this is the num seconds between reads (120=2mins) ***************************
int numReads = 2;   // Amount of reads between posting to Gdocs.  ***************************

byte mac[] = {0xAA, 0xF0, 0xDE, 0xDE, 0x06, 0xAF };  // Ethernet shield MAC addy
byte ip[] = { 10, 10, xx, yy };     
char devid [] = "vXXXXXXXXXXXXXXXX";  //  device ID from Pushingbox     

char server[] = "http://api.pushingbox.com";
EthernetClient client;

int c = '\0';

void setup()
{
  Serial.begin(9600);
  Serial.println ();

  Serial.print(F("dB_CoSdataV3.  Establishing..."));
  if (Ethernet.begin(mac) == 0) {
    Serial.println(F("Failed to configure ethernet"));

    //while (true); // no point in carrying on, so do nothing forevermore
  }
  else {
    Serial.println(F("Ethernet OK."));
    // print the Ethernet board/shield's IP address:
    Serial.print(F("local IP addy: "));
    Serial.println(Ethernet.localIP());
  }

  // give the Ethernet shield a second to initialize:
  delay(3000);

  Serial.println("____________________________________________");  Serial.println();

  dhtA.setup(3); //  sensor A
  dhtB.setup(4); //  sensor B
  //dhtC.setup(7); dhtD.setup(7);

  pinMode(ledPin, OUTPUT);

}

void loop(){

  int Ahumidity = 0;   int Atemperature = 0 ;
  int Bhumidity = 0;   int Btemperature = 0;

  int j = 0;
  for (j = 1; j &lt;= numReads ; j++ ) {
    int p = 0;
    for (p = 1; p &lt;= interval ; p++) {
      delay (1000);
      // if the LED is off turn it on and vice-versa:
      if (ledState == LOW) {        ledState = HIGH;       }
      else {        ledState = LOW;      }
      Serial.print (F("."));
      digitalWrite(ledPin, ledState);
    }

    Serial.print (" reading: ");
    Ahumidity += 10 * dhtA.getHumidity();  Atemperature += 10 * dhtA.getTemperature();
    Bhumidity += 10 * dhtB.getHumidity();  Btemperature += 10 * dhtB.getTemperature();

    Serial.print (j);     Serial.print (F("/"));     Serial.print (numReads);
    Serial.println();
  }

  Serial.print (F("Show the averaged val.s : "));
  Serial.print(F("\t\tA:")); Serial.print(Atemperature/(numReads)); Serial.print(F("\t")); Serial.print(Ahumidity/(numReads));
  Serial.print  (F("\tB:")); Serial.print(Btemperature/(numReads)); Serial.print(F("\t")); Serial.print(Bhumidity/(numReads));


  // now connect + write to Gdrive....................
  boolean connected;
  int counter1 = 0;
  do {
      connected = client.connect(server, 80);
      if (connected) { break; }
      client.stop();
      delay(1000);
      Serial.println("retry");
      counter1++;
  } while (!connected &amp;&amp; counter1 &lt;5);


//------------------
//if (client.connect(server, 80)) {

if (connected){
    Serial.println();
    Serial.print(F("OK connected! "));   

      String buf;

      buf += F("GET /pushingbox?devid=");
      buf += String(devid);

      buf += F("&amp;tempA=");  buf += String(Atemperature/numReads);
      buf += F("&amp;tempB=");  buf += String(Btemperature/numReads);
      buf += F("&amp;tempC=0&amp;tempD=0&amp;tempE=0&amp;tempF=0&amp;tempG=0&amp;tempH=0"); // null data needed

      buf += F("&amp;humidA=");  buf += String (Ahumidity/numReads);
      buf += F("&amp;humidB=");  buf += String (Bhumidity/numReads);
      buf += F("&amp;humidC=0&amp;humidD=0&amp;humidE=0&amp;humidF=0&amp;humidG=0&amp;humidH=0"); //null data needed



      buf += F("&amp;submit=Submit");
      buf += F(" HTTP/1.1");
      //client.println(F("Host: api.pushingbox.com"));
      buf += F("Host: http://api.pushingbox.com"); // trying the addition of http://...
      buf += F("Connection: close\r\n");
      //client.println();

      client.print(buf);
      Serial.print(F(" Written. "));
      delay(1000);   
      int counter2 = 0;
      Serial.print ("Checking response: ");

      do {
          if (client.available()) {
              Serial.print("Y ");
              c = client.read();
              Serial.print((char)c);
          }         
          delay(2000);
          Serial.print("+ ");
          counter2++;
      } while (counter2 &lt; 5);

      Serial.println ();       Serial.println ();
      //client.stop();     
  }


}
</code></pre>
 37622: <p>Your code for HTTP request has multiple issues.</p>

<p>After you connect to an HTTP server, it doesn't send anything until it receives your request. Your check for available bytes should always fail. Remove the <code>if (client.available())</code> part, including the <code>else</code> part.</p>

<p>You make a POST request, but you put all parameters to URL and the request has no body. Change it to GET or put the parameters into request body and use "Content-type: application/x-www-form-urlencoded". Don't forget the Content-length parameter.</p>

<p>You send the request in very small parts. Every single print is send right away over network. Concatenate strings and print one or use buffered print.</p>

<p>And you should read the HTTP response and check the status. </p>
