Cyphi.Client.Request (Cyphi v0.1.0)

Prepares and encodes HTTP request options for the Cyphi.Client.

This module transforms high-level request maps into adapter-compatible keywords by:

  • Injecting Headers: Adds default JSON content types, Accept headers, and the x-api-key for authentication.
  • Serializing Bodies: Encodes payloads to JSON, ensuring maps and keyword lists are normalized into ordered objects.
  • Mapping Parameters: Converts query parameters into the expected adapter format.

Summary

Functions

encode(request)

@spec encode(map()) :: keyword()