simple_http

Simple HTTP Client for Eiffel Applications

MIT License Eiffel 25.02 Design by Contract

Overview

SIMPLE_HTTP provides a clean HTTP client for Eiffel with automatic retry, cookie management, and a fluent builder API.

Key Features

Quick Start

Installation

<library name="simple_http" location="$SIMPLE_HTTP/simple_http.ecf"/>

Basic Usage

local
    http: SIMPLE_HTTP
    response: SIMPLE_HTTP_RESPONSE
do
    create http.make
    response := http.get ("https://api.example.com/data")
    if response.is_success then
        print (response.body)
    end
end

API Reference

FeatureDescription
get (url)GET request
post (url, data)POST request
put (url, data)PUT request
delete (url)DELETE request
set_bearer_tokenSet Bearer auth
set_basic_authSet Basic auth
enable_retryEnable retry
enable_cookiesEnable cookies