Skip to content

Epic: .http dialect parity (multipart, GraphQL, response-to-file, @ref, @retry, dynamic variables) #24

Closed
8 of 8 issues completed

Description

@dataGriff

Why

apic runs the common subset of the .http format shared by VS Code REST Client, JetBrains HTTP Client, kulala.nvim and httpyac. Several things those tools accept in a request file are currently stripped or unsupported, so a file that works in the editor can fail under apic. This epic tracks the gaps in the file format itself; runner, auth and CLI gaps are in the runner epic.

The rule for every child issue, from AGENTS.md: new features are # @directive comments before the request line, or syntax the editors already use. Never new request syntax. Every addition is documented in docs/format.md and gets a case in internal/httpfile/testdata/sample.http.

What is in scope

The sub-issues attached below, in priority order:

  • P1 multipart/form-data with file parts; # @ref to run a dependency; # @retry for polling
  • P2 GraphQL requests; >> file response-to-file; $timestamp offsets and the $random.* family
  • P3 # @disabled and # @sleep; honouring the HTTP version on the request line

Deliberately not planned

These come up in every comparison and are out of scope by design (see docs/comparison.md and docs/faq.md): JavaScript pre-request scripts and response handlers (> {% %}), @import/@loop, gRPC, WebSocket, MQTT and AMQP. A request file that can compute things stops being a file an editor can send and a reader can trust. The escape hatches stay --json, apic curl and # @auth exec.

Where

  • Parser: internal/httpfile/parse.go (KnownDirectives at lines 24-36, handler-block stripping at 260-292), ast.go
  • Runner: internal/runner/runner.go (body at 289-310, send at 505-560), vars.go (built-ins at 129-189)
  • Docs: docs/format.md, docs/cheatsheet.md, docs/comparison.md

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions