vitalets / vitalets/request-mocking-protocol

Cookie transport

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
37
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Along with custom header transport, it would be useful to support cookie transport of mocks. It will make easier integration with test runners and other tools (e.g. browser extensions).

Proof of concept

We can serialize mocks into a cookie named x-mock-request and check this cookie on server.

Caveats

Header is stateless, but cookie is stateful. Maybe we need to provide methods to clear the mocking cookie.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the existing custom header transport and the server request handling; then define how mocks are serialized in the x-mock-request cookie and how the cookie is cleared. Done means cookie transport works with the server and its stateful behavior is covered by the project’s tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.