class Docr::Client

Overview

Define the Docr::Client class for making HTTP requests to the Docker API.

Defined in:

docr/client.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

Initializes a new instance of the Docr::Client class.


[View source]

Instance Method Detail

def call(method : String, url : String | URI, headers : HTTP::Headers | Nil = nil, body : IO | Slice(UInt8) | String | Nil = nil, &) #

Makes an HTTP request to the Docker API.

  • method: The HTTP method (e.g., "GET", "POST", "PUT", "DELETE").
  • url: The URL or URI for the API endpoint.
  • headers: Optional HTTP headers.
  • body: Optional request body (e.g., JSON payload).
  • &block: A block to process the HTTP response.

[View source]