API client

A REST API client that keeps requests in git

Build and send HTTP requests in Microkoi Bench, organize them into collections and share them through your repository. Every request is a plain file, several requests form a chain that follows a user journey, and the response time is broken down by phase.

The Microkoi Bench requests section: a collection tree, a request editor with environment variables and a response with a timing phase bar.

From a recorded exchange to a collection

  1. 1

    Take it from traffic

    The “To Requests” button opens a recorded exchange in the client, without the proxy’s service headers.

  2. 2

    Edit and send

    Change the parameters, body and authorization. ⌘↩ sends the request; pressing it again cancels.

  3. 3

    Save to a collection

    ⌘S saves the request as a file in a collection folder, ready to commit alongside your code.

Everything for a request at hand

Parameters, headers, body, authorization and variables in one tabbed editor.

  • Any body

    JSON validated as you type, text, XML, and x-www-form-urlencoded and multipart/form-data forms.

  • Authorization

    A Bearer token, a Basic username and password, or an API key in a header or a query parameter.

  • Environment variables

    {{name}} is substituted into the URL, parameters, headers, body and authorization, and a variable that isn’t set shows in red before you send.

  • Timing phases

    DNS lookup, connection, TLS, waiting for the first byte and download, shown as a bar above the response.

  • Folder collections

    Collection folders are plain directories, and requests are .request.json files with readable names.

  • Send history

    Every send is saved, and clicking an entry opens a copy of it in a new tab.

  • Import specs and cURL

    The “Import” button turns OpenAPI, Swagger, a Postman collection or a cURL command into requests. “Copy as cURL” builds the command back.

  • From a request to monitoring

    The “Add to monitoring” button puts a request or a whole collection folder on a regular check.

  • Links from notes

    A note can link to a saved request: the link opens it in the client and survives renames.

In detail

Collections that live in your repository

Everything a person types is stored in files, and everything that happened when sending is stored in the database. So collections can sit next to your code, go through review and arrive from teammates with a plain git pull.

  • One request, one .request.json file named after the request
  • Renaming a request or moving it to another folder does not break open tabs
  • Writes are atomic: an interrupted save never leaves a half-written file
  • Files added by hand or pulled from git are picked up right away
  • “Find request” above the tree (⇧⌘F) finds a request by name, address or method and shows it in its folder
  • “Hide request list” at the start of the tab bar gives the editor the room, the choice is remembered, and in a narrow window the list collapses on its own

Environments and variables

An environment is a named set of variables. The active environment is picked on the tab bar and remembered separately for each workspace, and that choice stays out of git, so every teammate has their own.

  • Variables can reference each other up to five levels deep
  • Built-in {{$timestamp}}, {{$isoTimestamp}}, {{$uuid}} and {{$randomInt}} are evaluated on every send
  • A variable that’s set is highlighted in the variable color, one that isn’t in red with a wavy underline
  • Typing {{ opens the “Variables” list: “This run”, the selected environment and built-ins, with the value on the right and dots for a secret
  • A variable that is not found does not block sending; it shows up in a warning above the response
  • The “secret” flag hides a value in the interface, and the editor says plainly that it is not encrypted on disk

Sending without browser limits

Requests are sent by the app’s core, not by the web engine of the interface. So there are no restrictions on headers or cross-origin requests, and timing is measured honestly, from DNS lookup to the last byte.

  • Type a URL without a scheme: external hosts go over HTTPS, localhost over HTTP
  • Timeout, following redirects and certificate verification are set per request
  • A response up to 50 MB is stored in full — a large one as a file next to the database — and “Download” saves all of it
  • Certificate verification can be turned off only for a specific request, and only with a warning

Response model and endpoint contract

The “Model” view above a JSON response body shows its fields, their types and whether they are required — what a client developer calls a DTO. The response is checked against the endpoint contract Bench built from recorded traffic: a field that drifted shows its old and new type, and “Open contract” takes you to the endpoint in “Traffic”.

  • When the server sends JSON as a string inside a field, the model labels the field string (JSON) and shows the fields inside the string with a ~ path
  • A JSON request body has a model too, so you see which fields and types go to the server
  • “Copy model” copies the model as text: one line per field, with ? on optional ones

Values from a response go into the next requests

The “After response” tab takes a value from the response — a token after sign-in, an id from a list — into a variable, and the next requests fill it in on their own: {{token}} in a header, {{orderId}} in the URL. Rules fire after every 2xx response, so a 401 never overwrites a good token.

  • “Save to variable” on a field in the response “Model” adds a rule in one click, and the value is available right away
  • Values live in the “This run” layer until Bench closes and override the environment, and can also be written to the active environment
  • A field with a token, password or key taken from the “Model” is marked secret right away: its value is hidden in history, logs and reports
  • A path continues inside JSON sent as a string: result.MENU_JSON~dishes[0].id

From traffic in one click

No copying headers from one window to another. A recorded exchange opens in the client in full, and a branch of the endpoint tree is saved as a collection: a folder named after the host, with folders for path segments inside and one request for each path and method.

  • The proxy’s service headers are dropped on transfer
  • When saving a branch, Bench offers to move the server address, tokens and keys into environment variables: requests get references like {{baseUrl}}, and the values live in one place
  • Saving the same branch again does not overwrite earlier requests; it creates new ones with a number in the name
  • Sent requests appear only in the client history and never mix with recorded traffic

Request chains

Several requests from a collection form a chain, a user journey: sign in, list orders, open an order, check delivery. The schema editor shows the steps as a flow, and the arrows show the variables each step passes on. A step refers to a collection request, so an edit to the request shows up in every chain at once.

  • The “Authorization” block signs in once, keeps the token between runs, refreshes it with refresh_token, and retries a step after a 401 response. Tokens live in the system password store and never reach git
  • A step can have a pause or “Repeat”: “Until the expectations pass” waits for the response you need, and “While the response…” repeats the step while a long operation still answers, say, progress = in_progress
  • “Change for this step” sends the request with other query parameters, headers or body fields: one request can appear in a chain several times while the collection keeps just one
  • “Run” shows the state of every step and its exchange, and you don’t need to save the chain first
  • If an override or expectation line is wrong, the properties panel scrolls to it on its own, so the line and the reason are in full view
  • A chain can be built from exchanges selected in “Traffic” and checked on a schedule in “Monitoring”
The “Order and delivery” chain in Microkoi Bench: the “Authorization” block with token refresh and sign-in requests, three steps with the token, orderId and deliveryId variables on the arrows, a 2 s pause and a repeat every 2 s up to 30 s before delivery, and the selected step’s properties on the right: “Change for this step”, expectations and “Repeat” set to “Until the expectations pass”.

Import with a summary before writing

An OpenAPI 3 or Swagger 2 spec in JSON or YAML and a Postman v2 collection become a collection folder. You don’t pick the format: Bench detects it and, before writing anything, shows a summary — format and version, document title, how many folders and requests there will be and what won’t carry over.

  • The document comes from a file, a URL or pasted text — via the “Import” button above the collection tree
  • The server address and document variables go into a new or chosen environment, and hidden values already filled in are not overwritten
  • A folder with the same name stays as it is: the import creates a new one with a number in the name
  • Scripts, tests, file fields and unsupported authorization do not carry over — the summary names those requests
The “Import to Requests” window in Microkoi Bench: an OpenAPI 3.1 spec “Shop API” is recognized, 4 folders and 19 requests will be created, a folder and an environment for the baseUrl and token variables, warnings about authorization that won’t carry over and a second server.

cURL commands both ways

Paste a command from browser developer tools, documentation or your terminal right into the URL bar, or open it in a new tab through the “Import” window. The other way, “Copy as cURL” builds the command with the same code that sends requests, so it matches what would go over the network.

  • Understands the method, headers, body, forms, authorization, --json, -k, -L and other common options
  • Anything that would be lost silently — files in the body, for example — is reported in a bar above the editor
  • The copied command has the active environment’s variables and authorization filled in
  • A recorded request is copied as a command right from the exchange panel on the traffic screen

Questions and answers

How do I test a flow of several requests?

Build a chain: sign in, list, order. Steps run in order, and values pass between them through “After response” rules. “Run” shows which step the flow broke on and why. A chain can be built from recorded traffic and put into monitoring.

How do I wait for the server to finish a long operation?

Turn on “Repeat” for the step. “While the response…” repeats the step while the response matches a condition, for example while progress is in_progress, and checks the expectations as soon as it stops matching. “Until the expectations pass” repeats the step until the response you need arrives. Repeating is more reliable than a pause when you don’t know how long the server needs.

Can I keep request collections in git?

Yes. Each collection is a regular folder, and each request is a separate .request.json file. Changes show up in your commit history and go through review just like code.

Where are environment secrets stored?

An environment is a workspace file. The “secret” flag hides the value in the interface but does not encrypt it on disk, and if you commit the file, the value goes into the repository. The environment editor warns about this explicitly.

How do I replay a request my app sent?

Select the exchange on the traffic screen and click “To Requests”. The request opens in a new client tab with all its headers and body, ready to edit and send again.

How do I turn a cURL command into a request?

Paste the command into the URL bar, and the open tab fills in with the method, URL, headers and body. Or paste it into the “Import” window above the collection tree to open the result in a new tab. POSIX shell syntax is supported; Windows Command Prompt syntax is not.

Do requests to localhost work?

Yes. Without a scheme, requests to localhost, 127.0.0.1 and ::1 go over HTTP, because local development servers almost never run TLS.

Try it on your own project

The beta is free and needs no sign-up. Download it, pick your project folder and start the proxy — your first requests will show up within minutes.

Version 0.9.6 · macOS, Windows and Linux · no sign-up