Introduction
PocketbaseExtended is an Arduino library that lets ESP8266 and ESP32 boards talk to a PocketBase backend over HTTP/HTTPS.
It wraps PocketBase’s REST API into a concise, chainable interface and returns structured PBResponse objects so your sketch can handle success and failure without parsing raw status codes.
Why PocketbaseExtended?
Section titled “Why PocketbaseExtended?”Most IoT projects that need a backend end up hand-rolling HTTP requests, wrestling with JSON parsing, and duplicating error-handling boilerplate. PocketbaseExtended takes care of all of that:
- Chainable collection selector —
pb.collection("notes").getOne("id") - Structured responses — every method returns
ok,statusCode,body, anderror - Auth token management — login once, every subsequent request carries the token automatically
- No heavy dependencies — uses only the platform’s built-in WiFi and HTTP stacks
Supported platforms
Section titled “Supported platforms”| Platform | WiFi / HTTP library used |
|---|---|
| ESP8266 | ESP8266WiFi + ESP8266HTTPClient |
| ESP32 | WiFi + HTTPClient + WiFiClientSecure |
The correct headers are selected at compile time via #ifdef — you do not need to change library code for either board.
PocketBase compatibility
Section titled “PocketBase compatibility”PocketBase v0.16 and later. The library targets the stable REST API surface (/api/collections, /api/health, /api/files).
Backward compatibility
Section titled “Backward compatibility”If you used the previous PocketbaseArduino class name, a type alias is provided:
using PocketbaseArduino = PocketbaseExtended;Existing sketches compile without any changes.