---
title: "Send HTTP requests from Pico LTE"
description: "Send GET, POST and PUT requests from the Pico LTE to a web server over the cellular connection, with Webhook.site as the test server."
url: "https://docs.sixfab.com/cellular/pico-lte/micropython-sdk/http-requests-web-server/"
last_updated: "2026-10-12"
---

# Send HTTP requests from Pico LTE

Send GET, POST and PUT requests from the Pico LTE to a web server over the cellular connection, with Webhook.site as the test server.

These examples send GET, POST and PUT requests from the Pico LTE to a web server over the cellular connection, and read the response. [Webhook.site](https://webhook.site) is the test server: it shows every request it receives. No extra hardware is needed.

## Before you begin

**Required**

**Hardware**

- **Sixfab Pico LTE or Pico LTE 2**: Registered and active in Sixfab Connect, connected to the computer with the micro USB cable.

**Software**

- **Thonny with MicroPython and the Pico LTE SDK**: Set up as in the [quickstart](https://docs.sixfab.com/cellular/pico-lte/quickstart/).
- **config.json**: In the root of the board: [Prepare the configuration file](https://docs.sixfab.com/cellular/pico-lte/micropython-sdk/configuration-file/).

## Prepare Webhook.site

1. **Open Webhook.site.**

   Open [webhook.site](https://webhook.site) in a browser. It shows your unique URL; the requests sent to it appear in the side bar.

   ![Webhook.site start page showing your unique URL and email address, waiting for the first request](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/HTTP-Request-to-Web-Server-1.gif)

2. **Set response.**

   The examples also read the server’s response. Click **Edit** and set:

   - **Status code:** `200`, success.
   - **Content type:** `text/plain` for plain text, `application/json` for JSON.
   - **Response body:** the response to return; this one returns a message and the time of the request:

   ```json
   {
       "response": "Hello",
       "timeOfReq": $request.timestamp$
   }
   ```

   Click **Save**.

   ![Webhook.site Edit URL dialog with status code 200, application/json content type, response body and Save button](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/HTTP-Request-to-Web-Server-2-scaled.jpg)

## Set server

In `config.json`, set the server; Webhook.site needs no username or password, so leave them empty:

```json
{
    "https": {
        "server": "https://webhook.site/000-****-****-****-*********",
        "username": "",
        "password": ""
    }
}
```

For a server with basic HTTP authentication, set `username` and `password`, and add `picoLTE.http.set_auth()` after `picoLTE.network.get_pdp_ready()` in the script.

## Run examples

Open the script from the `examples/http` folder of the [SDK repository](https://github.com/sixfab/pico_lte_micropython-sdk) in Thonny and click **Run**. The request appears on Webhook.site, and the log shows the response.

**GET**

Script: `examples/http/get.py`.

![Thonny IDE running get.py from the Pico LTE SDK with shell output ending in Get request succeeded](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-GET-Example.png)

```text
INFO: Sending a GET request.
INFO: {'response': ['OK'], 'status': 0}
INFO: {'response': ['+QHTTPGET: 0,200', '{', ' response": "Hello", "timeOfReq": 1686009056', '}', 'OK', '+QHTTPREAD: 0'], 'status': 0}
INFO: Get request succeeded.
```

![Webhook.site dashboard showing the GET request received from the Pico LTE, user-agent QUECTEL_MODULE](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-GET-Example-2.jpg)

**POST**

Script: `examples/http/post.py`.

![Thonny IDE with the Pico LTE post.py example sending a JSON payload PicoLTE HTTP Post Example](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-POST-Example.png)

```text
INFO: Sending a POST request.
INFO: {'response': ['OK', '+QHTTPPOST: 0,200'], 'status': 0}
INFO: Post request succeeded.
INFO: {'response': ['{', '"response": "Hello",', '"timeOfReq": 1687272527', '}', 'OK', '+QHTTPREAD: 0'], 'status': 0}
```

![Webhook.site showing the POST request from the Pico LTE with raw content PicoLTE HTTP Post Example](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-POST-Example-2.jpg)

**PUT**

Script: `examples/http/put.py`.

![Thonny IDE with the Pico LTE put.py example sending a JSON payload PicoLTE HTTP Put Example](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-PUT-Example.png)

```text
INFO: Sending a PUT request.
INFO: {'response': ['OK', '+QHTTPPUT: 0,200'], 'status': 0}
INFO: Put request succeeded.
INFO: {'response': ['{', '"response": "Hello",', '"timeOfReq": 1687278386', '}', 'OK', '+QHTTPREAD: 0'], 'status': 0}
```

![Webhook.site showing the PUT request from the Pico LTE with raw content PicoLTE HTTP Put Example](https://docs.sixfab.com/wp-content/uploads/sixfab-docs/PicoLTE-HTTP-Request-to-Web-Server-PUT-Example-2.jpg)

The folder also has `get_with_custom_header.py` and `post_with_custom_header.py`, which send custom request headers.

## Troubleshooting

- `+CME ERROR: 703` when reading the response: wait longer before reading it.
- `+CME ERROR: 712` on a POST or PUT request: the server URL is wrong or empty. Set the full URL, with `https://` and the query, in `config.json`.
