{"id":16981958,"url":"https://github.com/1602/witness","last_synced_at":"2025-03-21T23:40:52.917Z","repository":{"id":57517268,"uuid":"177655209","full_name":"1602/witness","owner":"1602","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-12T22:19:34.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-26T18:11:29.488Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1602.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-25T19:58:01.000Z","updated_at":"2024-02-11T17:45:03.000Z","dependencies_parsed_at":"2024-02-22T15:27:16.094Z","dependency_job_id":"912f7b31-f301-45d6-b690-9726e9d206dc","html_url":"https://github.com/1602/witness","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fwitness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fwitness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fwitness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1602%2Fwitness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1602","download_url":"https://codeload.github.com/1602/witness/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244885515,"owners_count":20526293,"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":[],"created_at":"2024-10-14T02:06:56.902Z","updated_at":"2025-03-21T23:40:52.889Z","avatar_url":"https://github.com/1602.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/1602/witness)](https://goreportcard.com/report/github.com/1602/witness)\n[![Build Status](https://travis-ci.org/1602/witness.svg?branch=main)](https://travis-ci.org/1602/witness)\n[![Coverage Status](https://img.shields.io/coveralls/github/1602/witness.svg)](https://coveralls.io/github/1602/witness?branch=main)\n\n## Witness\n\nEnables debugging of http requests via UI. It is like chrome devtools for go backend.\n\n## How it works\n\nIt uses `httptrace.WithClientTrace` to make a `http.RoundTripper` eavesdropping on http connection. This allows detailed analysis of various http request stages. All information gathered then pushed using EventStream to UI running in browser.\n\n## Usage\n\nThe idea is to observe http client you want to debug by calling `witness.DebugClient` with the http client in question. For example, if you \"own\" a client to make http calls to some API:\n\n```\n// init http client with any configuration you need\ncl := \u0026http.Client{}\n\n// pass client to witness to wrap its Transport with eavesdropping functionality\n// it will also start SSE notification channel\nwitness.DebugClient(cl)\n\n// then use cl as http client for making request\n```\n\nAlternatively, is you are interested in behaviour of some third-party http client, k8s client for example, you could eavesdrop on http client created by k8s go client code.\nTODO: make demo of k8s client eavesdropping\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Fwitness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1602%2Fwitness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1602%2Fwitness/lists"}