HMPO Model is a Node.js library for creating simple data models with local and remote (HTTP/REST) backends. Version 7.0.1 uses the `got` HTTP library, replacing the deprecated `request`. It provides a LocalModel for in-memory data persistence with change events and a RemoteModel subclass for REST API interactions supporting GET (fetch), POST (save), and DELETE (destroy) methods. Key differentiators include its event-driven model, proxy support via request config, and explicit URL and auth methods for API requests. It is maintained by UK Home Office HMPO and targets Node.js 24.x.
npm install hmpo-modelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows extending HmpoModel with a url, setting attributes, and performing save (POST) and fetch (GET) operations.
Update HTTP calls to use 'got' config style. Put request body in requestConfig as 'json', 'body', or 'form'.
Use 'import' syntax or switch to dynamic import(). Do not use require().
In requestConfig, set 'proxy' option or add 'global-agent' to your app and set environment variables.
Use 'got' native proxy option or upgrade to newer version when available.
Use import HmpoModel from 'hmpo-model'; or use dynamic import().
Place request body in requestConfig under 'json', 'body', or 'form'.
Configure proxy in requestConfig or use global-agent to handle proxy settings.