Rest Command (client.println) not working with ATwin1500

Hope someone can help or give me direction. Have spend two days searching the internet and cannot find a solution to my code problem.

I am trying to use a rest command to update a variable in a home automation controller (ISY994i). using the atwin1500, I can log onto my router and access google.com, but I am unable to get it to update a variable in my ISY.

No error messages occur when compiling. Here is my code if anyone can help.

#include <SPI.h>
#include <WiFi101.h>

int status = WL_IDLE_STATUS;

WiFiClient client;

int varId = 148;  // This is the variable I am updating
int value = 50;  // Trying to send this variable to ISY

void setup() {
  Serial.begin(9600);
  while (!Serial) {
    ; 
  }

WiFi.setPins(8,2,4);  // CS, IRQ, RST

  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    status = WiFi.begin(ssid, pass);

    delay(10000);
  }
  Serial.println("Connected to wifi");
  printWiFiStatus();

  Serial.println("\nStarting connection to server...");
  // if you get a connection, report back via serial:
  if (client.connect(server, 80)) {
    Serial.println("connected to server");

//  At this point, the code is not doing what I want it to do
      
    client.println(String("GET ") + "/rest/vars/set/1/" + String (varId) + "/" + String (value) + " HTTP/1.1");
    //client.println("GET /rest/vars/set/1/148/1/ HTTP/1.1"); // This did not work either
    client.println("Host: xxx.xxx.x.xx:80");
    client.println("User-Agent: Mozilla/4.0");
    client.println("Connection: Close"); 
    client.println("Content-Type: application/x-www-form-urlencoded");
    client.println("Authorization: Basic YXTBwbGVzOm79yYW5nZXM=");  //This is not my actual username and passoword
    client.println();
    Serial.println(value);
    delay(10000);
    client.stop();
  }
}

Did you read the sticky post at the top of the topic (How to use the Forum)?

No wiring diagram, no link to the manual of the controller, no link to the used hardware.

    client.println("Authorization: Basic YXTBwbGVzOm79yYW5nZXM=");  //This is not my actual username and passoword

I don't expect you to post your actual credentials but this garbage isn't even base64 encoded. Do you know how to create the actual string?

You don't need the User-Agent header but you may need the Accept header but the controller manual should tell you that (but you failed to provide it).