Http get using 3rd party sim card boron device

Hi,
I have the following code which works only when using particle sim. If I try to compile the same code with 3rd party sim card (cellular data is ON), it doesnt work. Please help me understand if there is anything I need to enable for 3rd party sim card to do http get.

I am able to get “connected to server success” message, but no response in client.read.

void setup()
{
  // Make sure your Serial Terminal app is closed before powering your device
  Serial.begin(9600);
  // Wait for a USB serial connection for up to 30 seconds
  waitFor(Serial.isConnected, 30000);

  Serial.println("connecting...");

  if (client.connect(hostname, 8080))
  {
    Serial.println("connected to server success");
    client.print("GET ");
    client.print(path);
    client.print(" HTTP/1.0\r\n");
    client.print("HOST: ");
    client.println(hostname);
    client.println();
    
    
    client.println("Content-Length: 0");
     
    client.println();

  }
  else
  {
    Serial.println("connection failed");
  }
}

void loop()
{
  if (client.available())
  {
     String cmd  = client.readStringUntil('\n'); //client.read();
     Serial.printlnf("%s\n", cmd.c_str());

  }

  if (!client.connected())
  {
    Serial.println();
    Serial.println("disconnecting.");
    client.stop();
    for(;;);
  }
}

If you are running this code with a 3rd party SIM you are missing the SIM selection, the APN setting and the Particle.keepAlive() settings for that provider.

The docs are your friend
https://docs.particle.io/support/particle-devices-faq/electron-3rdparty-sims (don’t mind that it starts off talking about Electron - this also applies to Boron).

However, the samples there seem to be missing the Particle.keepAlive() setting.

Thanks for the reply. Connection to google server seems to be working fine. But I am not able to get any response from our internal sever.
Server is able to receive the http get request from the device.

I am using Boron LTE device with ATT sim in it.

Which HTTP library are you using?