{"id":13878724,"url":"https://github.com/digital-fabric/qeweney","last_synced_at":"2025-04-23T14:05:04.101Z","repository":{"id":56889762,"uuid":"337798667","full_name":"digital-fabric/qeweney","owner":"digital-fabric","description":"Cross-library feature rich HTTP request / response API","archived":false,"fork":false,"pushed_at":"2025-02-09T17:34:01.000Z","size":71,"stargazers_count":47,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-15T15:02:39.927Z","etag":null,"topics":["http","rack","ruby","websocket"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-fabric.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"noteflakes"}},"created_at":"2021-02-10T17:24:00.000Z","updated_at":"2025-02-13T20:47:31.000Z","dependencies_parsed_at":"2023-07-15T14:04:05.141Z","dependency_job_id":null,"html_url":"https://github.com/digital-fabric/qeweney","commit_stats":{"total_commits":83,"total_committers":2,"mean_commits":41.5,"dds":"0.012048192771084376","last_synced_commit":"7e73996a21f08248b3d7549a254dab29daf11fd2"},"previous_names":["digital-fabric/qna"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-fabric%2Fqeweney","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-fabric%2Fqeweney/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-fabric%2Fqeweney/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-fabric%2Fqeweney/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-fabric","download_url":"https://codeload.github.com/digital-fabric/qeweney/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250447861,"owners_count":21432163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["http","rack","ruby","websocket"],"created_at":"2024-08-06T08:01:57.837Z","updated_at":"2025-04-23T14:05:04.041Z","avatar_url":"https://github.com/digital-fabric.png","language":"Ruby","funding_links":["https://github.com/sponsors/noteflakes"],"categories":["Ruby"],"sub_categories":[],"readme":"# Qeweney - add water, makes its own sauce!\n\n[![Gem Version](https://badge.fury.io/rb/qeweney.svg)](http://rubygems.org/gems/qeweney)\n[![Modulation Test](https://github.com/digital-fabric/qeweney/workflows/Tests/badge.svg)](https://github.com/digital-fabric/qeweney/actions?query=workflow%3ATests)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/digital-fabric/qeweney/blob/master/LICENSE)\n\n## Cross-library HTTP request / response API for servers\n\nQeweney provides a uniform API for dealing with HTTP requests and responses on\nthe server side. Qeweney defines a uniform adapter interface that allows\nhandling incoming HTTP requests and sending HTTP responses over any protocol or\ntransport, be it HTTP/1, HTTP/2 or a Rack interface.\n\nQeweney is primarily designed to work with\n[Tipi](https://github.com/digital-fabric/tipi), but can also be used directly\ninside Rack apps, or to drive Rack apps.\n\n## Features\n\n- Works with different web server APIs, notably Tipi, Digital Fabric, and Rack.\n- Transport-agnostic.\n- High-performance routing API inspired by Roda.\n- Rich API for extracting data from HTTP requests: form parsing, cookies, file\n  uploads, etc.\n- Rich API for constructing HTTP responses: streaming responses, HTTP upgrades,\n  static file serving, delate and gzip encoding, caching etc.\n- Suitable for both blocking and non-blocking concurrency models.\n- Allows working with request before request body is read and parsed.\n\n## Overview\n\nIn Qeweney, the main class developers will interact with is `Qeweney::Request`,\nwhich encapsulates an HTTP request (from the server's point of view), and offers\nan API for extracting request information and responding to that request.\n\nA request is always associated with an _adapter_, an object that implements the\nQeweney adapter interface, and that allows reading request bodies (for uploads\nand form submissions) and sending responses.\n\n## The Qeweney Adapter Interface\n\n```ruby\nclass AdapterInterface\n  # Reads a chunk from the request body\n  # @req [Qeweney::Request] request for which the chunk is to be read\n  def get_body_chunk(req)\n  end\n\n  # Send a non-streaming response\n  # @req [Qeweney::Request] request for which the response is sent\n  # @body [String, nil] response body\n  # @headers [Hash] response headers\n  def respond(req, body, headers)\n  end\n\n  # Send only headers\n  # @req [Qeweney::Request] request for which the response is sent\n  # @headers [Hash] response headers\n  # @empty_response [boolean] whether response is empty\n  def send_headers(req, headers, empty_response: nil)\n  end\n\n  # Send a body chunk (this implies chunked transfer encoding)\n  # @req [Qeweney::Request] request for which the response is sent\n  # @body [String, nil] chunk\n  # @done [boolean] whether response is finished\n  def send_chunk(req, body, done: false)\n  end\n\n  # Finishes response\n  # @req [Qeweney::Request] request for which the response is sent\n  def finish(req)\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-fabric%2Fqeweney","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-fabric%2Fqeweney","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-fabric%2Fqeweney/lists"}