{"id":3520919,"name":"github.com/cabify/sling","ecosystem":"go","description":"Package sling is a Go HTTP client library for creating and sending API requests.\n\nSlings store HTTP Request properties to simplify sending requests and decoding\nresponses. Check the examples to learn how to compose a Sling into your API\nclient.\n\nUse a Sling to set path, method, header, query, or body properties and create an\nhttp.Request.\n\nUse Path to set or extend the URL for created Requests. Extension means the\npath will be resolved relative to the existing URL.\n\nUse Get, Post, Put, Patch, Delete, or Head which are exactly the same as Path\nexcept they set the HTTP method too.\n\nAdd or Set headers for requests created by a Sling.\n\nDefine url parameter structs (https://godoc.org/github.com/google/go-querystring/query).\nUse QueryStruct to encode a struct as query parameters on requests.\n\nDefine JSON tagged structs (https://golang.org/pkg/encoding/json/).\nUse BodyJSON to JSON encode a struct as the Body on requests.\n\nRequests will include an \"application/json\" Content-Type header.\n\nDefine url tagged structs (https://godoc.org/github.com/google/go-querystring/query).\nUse BodyForm to form url encode a struct as the Body on requests.\n\nRequests will include an \"application/x-www-form-urlencoded\" Content-Type\nheader.\n\nUse Body to set a plain io.Reader on requests created by a Sling.\n\nSet a content type header, if desired (e.g. Set(\"Content-Type\", \"text/plain\")).\n\nEach Sling generates an http.Request (say with some path and query params)\neach time Request() is called, based on its state. When creating\ndifferent slings, you may wish to extend an existing Sling to minimize\nduplication (e.g. a common client).\n\nEach Sling instance provides a New() method which creates an independent copy,\nso setting properties on the child won't mutate the parent Sling.\n\nWithout the calls to base.New(), tweetShowSling and tweetPostSling would\nreference the base Sling and POST to\n\"https://api.twitter.com/1.1/statuses/show.json/statuses/update.json\", which\nis undesired.\n\nRecap: If you wish to extend a Sling, create a new child copy with New().\n\nDefine a JSON struct to decode a type from 2XX success responses. Use\nReceiveSuccess(successV interface{}) to send a new Request and decode the\nresponse body into successV if it succeeds.\n\nMost APIs return failure responses with JSON error details. To decode these,\ndefine success and failure JSON structs. Use\nReceive(successV, failureV interface{}) to send a new Request that will\nautomatically decode the response into the successV for 2XX responses or into\nfailureV for non-2XX responses.\n\nPass a nil successV or failureV argument to skip JSON decoding into that value.","homepage":"https://github.com/cabify/sling","licenses":"MIT","normalized_licenses":["MIT"],"repository_url":"https://github.com/cabify/sling","keywords_array":[],"namespace":"github.com/cabify","versions_count":4,"first_release_published_at":"2018-01-22T07:29:52.000Z","latest_release_published_at":"2016-12-18T11:07:05.000Z","latest_release_number":"v1.1.0","last_synced_at":"2026-03-19T03:49:34.256Z","created_at":"2022-04-10T22:08:58.197Z","updated_at":"2026-03-19T03:49:34.256Z","registry_url":"https://pkg.go.dev/github.com/cabify/sling","install_command":"go get github.com/cabify/sling","documentation_url":"https://pkg.go.dev/github.com/cabify/sling#section-documentation","metadata":{},"repo_metadata":{"uuid":"118421629","full_name":"cabify/sling","owner":"cabify","description":"A Go HTTP client library for creating and sending API requests","archived":false,"fork":true,"pushed_at":"2019-02-20T11:07:39.000Z","size":129,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":61,"default_branch":"master","last_synced_at":"2023-03-12T07:06:26.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dghubble/sling","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"logo_url":null,"metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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-22T07:26:27.000Z","updated_at":"2019-10-01T21:59:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cabify/sling","commit_stats":null,"repository_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Fsling","tags_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Fsling/tags","manifests_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cabify%2Fsling/manifests","owner_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cabify","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":108921946,"host_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"http://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names"}},"repo_metadata_updated_at":"2023-03-21T18:42:08.148Z","dependent_packages_count":0,"downloads":null,"downloads_period":null,"dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":9.345852080216646,"dependent_packages_count":6.999148183520997,"stargazers_count":null,"forks_count":null,"average":8.172500131868823},"purl":"pkg:golang/github.com/cabify/sling","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/go/github.com/cabify/sling","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/go/github.com/cabify/sling","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/go/github.com/cabify/sling/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2023-07-04T06:37:57.474Z","issues_count":0,"pull_requests_count":4,"avg_time_to_close_issue":null,"avg_time_to_close_pull_request":87039.0,"issues_closed_count":0,"pull_requests_closed_count":4,"pull_request_authors_count":2,"issue_authors_count":0,"avg_comments_per_issue":null,"avg_comments_per_pull_request":0.75,"merged_pull_requests_count":3,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fcabify%2Fsling/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fcabify%2Fsling/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fcabify%2Fsling/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fcabify%2Fsling/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/proxy.golang.org/packages/github.com%2Fcabify%2Fsling/codemeta","maintainers":[]}