{"@context":"https://w3id.org/codemeta/3.0","@type":"SoftwareSourceCode","identifier":"pkg:golang/github.com/andreyvit/httpsimplified/v2@v2.0.2","name":"github.com/andreyvit/httpsimplified/v2","description":"Package httpsimp sends outgoing HTTP requests via a simple straightforward\nAPI distilled from many internal Golang projects at USA Today Network.\nIt embraces Go stdlib types like url.Values and http.Header, provides composable\nbuilding blocks for more complex use cases and doesn't try to be clever.\n\nCall Perform with MakeGet, MakeForm, MakeJSON or Make\nto send a request and parse the response:\n\nwhere httpsimp.JSON is a body parser function (we also provide PlainText,\nBytes, Raw and None parsers, and you can define your own).\nSee the example for more details.\n\nYou need to pass an instance of *http.Client. You can use http.DefaultClient,\nbut note that the default client has no timeouts and might potentially hang\nforever, causing goroutine leaks. A custom client is strongly recommended:\n\nYou can adjust body parser parameters by passing additional options to body\nparser functions, like this:\n\nAvailable options:\n\n- httpsimp.StatusAny, httpsimp.Status4xx, httpsimp.Status4xx5xx, or a specific\nstatus like httpsimp.StatusOK or httpsimp.StatusSpec(http.StatusTeapot) will\nmatch only responses with the given status.\n\n- httpsimp.ContentType(\"application/something\") will match only response with\nthe given content type.\n\n- httpsimp.ContentType(\"\") will match any content type (can be used to cancel\ndefault application/json filter used by JSON).\n\n- httpsimp.ReturnError() results in a non-nil error returned.\n\nPass multiple parsers to handle alternative response types or non-2xx status codes:\n\nIf you need a cancelable request, use http.Request.WithContext:\n\nYou can build the entire http.Request yourself and just call Perform:\n\nWhen building custom requests, use our helpers:\n\nURL concatenates a URL and adds query params.\n\nEncodeForm, EncodeJSONBody and SetBody add a body to a request.\n\nFinally, you're free to obtain an http.Response through other means\nand then call Parse to handle the response:\n\nTo handle HTTP basic authentication, use BasicAuthValue helper:","version":"v2.0.2","softwareVersion":"v2.0.2","license":"https://spdx.org/licenses/MIT","codeRepository":"https://github.com/andreyvit/httpsimplified","issueTracker":"https://github.com/andreyvit/httpsimplified/issues","url":"https://github.com/andreyvit/httpsimplified","programmingLanguage":{"@type":"ComputerLanguage","name":"Go"},"dateCreated":"2020-01-24","dateModified":"2026-06-07","datePublished":"2020-01-24","copyrightYear":2020,"downloadUrl":"https://proxy.golang.org/cached-only/github.com/andreyvit/httpsimplified/v2/@v/v2.0.2.zip","softwareHelp":{"@type":"WebSite","url":"https://pkg.go.dev/github.com/andreyvit/httpsimplified/v2@v2.0.2#section-documentation"},"applicationCategory":"go","runtimePlatform":"go","developmentStatus":"active","sameAs":["https://pkg.go.dev/github.com/andreyvit/httpsimplified/v2@v2.0.2"]}