Browse documentation

Request-FP

An easy, memory-safe HTTP client for Free Pascal. One line per request, no objects to free, and sensible behaviour when the network is not.

uses Request;

var
  Response: TResponse;
begin
  Response := Http.Get('https://api.example.com/users');
  Response.RaiseForStatus;
  WriteLn(Response.JSON.FindPath('[0].name').AsString);
end.

There is no client to create and nothing to free: TResponse cleans itself up, including its parsed JSON.

What you get

NeedRequest-FP
Quick callsHttp.Get, Post, PostJSON, PutJSON, PatchJSON, Delete, Head
Forms and filesPostForm, PostMultipart (files streamed from disk)
Large downloadsHttp.Download(URL, FilePath, @ShowProgress)
Shared stateTHttpSession: base URL, headers, cookies, auth
Flaky networksAutomatic retries for safe methods, Retry-After, timeouts
Clear failuresETimeoutError, ENetworkError, ERequestError, or Try* results
HTTPSOpenSSL 3 found automatically on Windows, Linux, and macOS

A request travels from your code through Request-FP to the server and back as a TResponse or a typed error

Pick your path

Requirements