Faraday is a Ruby HTTP client library with a middleware-based architecture (similar to Rack). It provides a common interface over various HTTP adapters and uses middleware for request/response processing.
Before making any code changes or suggestions, you must read and follow the comprehensive guidelines in .ai/guidelines.md.
- Read
.ai/guidelines.mdfor all Faraday-specific conventions and patterns - Follow the established conventions documented there
- Propose updates to
.ai/guidelines.mdwhen you identify:- New code patterns not yet documented
- Changes to existing conventions
- Inconsistencies between guidelines and actual codebase
- New middleware and adapters should be created as separate gems, NOT added to the base Faraday repository (with rare exceptions for widely-used core middleware)
- See faraday-net_http as an example adapter in its own repository
- Focus on Faraday-specific patterns, not generic Ruby/RSpec advice
.ai/guidelines.md- Complete Faraday conventions (PRIMARY REFERENCE).github/CONTRIBUTING.md- Contribution process and policieslib/faraday/middleware.rb- Middleware base classlib/faraday/request/json.rb- Example middleware implementation
Keep .ai/guidelines.md current. Propose updates when you notice any drift between documentation and reality.