{"id":25864907,"url":"https://github.com/stackloklabs/reqparse","last_synced_at":"2025-10-17T04:19:46.672Z","repository":{"id":262259451,"uuid":"886699073","full_name":"StacklokLabs/reqparse","owner":"StacklokLabs","description":"Simple Request Intercept to help understand an APIs structure","archived":false,"fork":false,"pushed_at":"2024-11-11T13:04:44.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-11T13:39:10.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/StacklokLabs.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":"2024-11-11T12:54:28.000Z","updated_at":"2024-11-11T13:04:47.000Z","dependencies_parsed_at":"2024-11-11T16:31:11.545Z","dependency_job_id":null,"html_url":"https://github.com/StacklokLabs/reqparse","commit_stats":null,"previous_names":["stackloklabs/reqparse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Freqparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Freqparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Freqparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Freqparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StacklokLabs","download_url":"https://codeload.github.com/StacklokLabs/reqparse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241447331,"owners_count":19964308,"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":"2025-03-02T01:31:05.785Z","updated_at":"2025-10-17T04:19:41.616Z","avatar_url":"https://github.com/StacklokLabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReqParser\n\nReqParser is a HTTP request parsing and formatting tool that accepts and logs HTTP requests, parses JSON data, and optionally converts it into Go or Rust struct definitions.\n\n## Features\n\n- Accepts and logs all HTTP methods (GET, POST, PUT, DELETE, etc.)\n- Parses and displays JSON request bodies\n- Optional conversion to programming language formats:\n  - Go structs\n  - Rust structs (with serde attributes)\n- Pretty print JSON with delimiters\n- Optional HTTP headers display\n\n## Installation\n\n```bash\ngo install github.com/stackloklabs/reqparser@latest\n```\n\nOr clone and build manually:\n\n```bash\ngit clone https://github.com/stackloklabs/reqparser.git\ncd reqparser\nmake build\n```\n\n### Flag Behavior\n\n- With `-pretty`: Shows JSON with delimiters\n- Without `-pretty`: Shows compact JSON-Body format\n- With `-headers`: Shows HTTP headers\n- With `-format go|rust` Generates a struct\n\n* Note: Only parent structs, need to code up child struct generation \n\n### Example Outputs\n\n1. Basic usage (no flags):\n```\nJSON-Body: {\"name\":\"test\",\"value\":123}\n```\n\n2. With `-pretty`:\n```\n==================\nJSON START\n{\n    \"name\": \"test\",\n    \"value\": 123\n}\n==================\nJSON END\n==================\n```\n\n3. With `-headers`:\n```\nContent-Type: application/json\nUser-Agent: curl/7.79.1\nAccept: */*\nContent-Length: 31\n\nJSON-Body: {\"name\":\"test\",\"value\":123}\n```\n\n4. With `-format go`:\n```\nJSON-Body: {\"name\":\"test\",\"value\":123}\nStruct format:\ntype GeneratedStruct struct {\n    name string `json:\"name\"`\n    value float64 `json:\"value\"`\n}\n```\n\n5. With `-format rust`:\n```\nJSON-Body: {\"name\":\"test\",\"value\":123}\nStruct format:\n#[derive(Debug, Serialize, Deserialize)]\nstruct GeneratedStruct {\n    #[serde(rename = \"name\")]\n    name: String,\n    #[serde(rename = \"value\")]\n    value: f64,\n}\n```\n\n## Command Line Options\n\n```\nUsage of reqparser:\n\nreqparser is a HTTP request parsing and formatting tool\n\nOptions:\n  -port int\n        Port to run the server on (default 8080)\n  -format string\n        Output format type (go, rust) - if not provided, no struct will be generated\n  -pretty\n        Pretty print JSON with delimiters (if not provided, shows compact JSON-Body)\n  -headers\n        Show HTTP headers in output\n  -version\n        Show version information\n```\n\n### Prerequisites\n\n- Go 1.20 or later\n- Make\n- golangci-lint (installed automatically via Makefile)\n- gosec (installed automatically via Makefile)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Freqparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackloklabs%2Freqparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Freqparse/lists"}