{"id":25014323,"url":"https://github.com/gregoryv/trip","last_synced_at":"2025-03-30T05:13:20.877Z","repository":{"id":57487326,"uuid":"116685046","full_name":"gregoryv/trip","owner":"gregoryv","description":"go package implements a round-trip pattern for http requests","archived":false,"fork":false,"pushed_at":"2018-01-12T12:41:37.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T07:19:33.385Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregoryv.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}},"created_at":"2018-01-08T14:12:29.000Z","updated_at":"2018-01-08T14:17:31.000Z","dependencies_parsed_at":"2022-09-01T22:51:19.222Z","dependency_job_id":null,"html_url":"https://github.com/gregoryv/trip","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/gregoryv%2Ftrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Ftrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Ftrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregoryv%2Ftrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregoryv","download_url":"https://codeload.github.com/gregoryv/trip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277360,"owners_count":20751549,"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-02-05T07:19:05.879Z","updated_at":"2025-03-30T05:13:20.855Z","avatar_url":"https://github.com/gregoryv.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/gregoryv/trip.svg?branch=master)](https://travis-ci.org/gregoryv/trip)\n[![codecov](https://codecov.io/gh/gregoryv/trip/branch/master/graph/badge.svg)](https://codecov.io/gh/gregoryv/trip)\n[![Maintainability](https://api.codeclimate.com/v1/badges/b0001c5ba7cd098b183d/maintainability)](https://codeclimate.com/github/gregoryv/trip/maintainability)\n\n[trip](https://godoc.org/github.com/gregoryv/trip) - implements a round-trip pattern for http requests\n\n## Quick start\n\n    go get github.com/gregoryv/trip\n\n## The round-trip pattern\n\nA round-trip pattern is basically\n\n1. Prepare trip\n2. Execute\n3. Optionally parse response\n\nOther descriptions that fit this pattern would be remote procedure\ncall(RPC), which http requests are of sorts. With this package the\nsteps inbetween are abstracted and you get to write more go idomatic\ncode. I designed this package in a way that resembles `os.exec`\n\nPrepare trip\n\n\trequest := http.NewRequest(\"GET\", \"/\", nil)\n\tcmd := trip.NewCommand(request)\n\nDo the trip\n\n    statusCode, err := cmd.Run()\n\t// or if you want the response parsed\n\terr := cmd.Output(\u0026model)\n\n## When to use\n\nWhen you talk to remote services and need to only vary parts of the\nflow, ie.  an API has changed and requires a new parameter, then you\nonly have to modify the part that builds your request. Hopefully it's\neasier to maintain a backwards compatible client for a constantly\nchanging remote service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryv%2Ftrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregoryv%2Ftrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregoryv%2Ftrip/lists"}