|
4 | 4 | <p align="center"><a href="#features">Features</a> section describes in detail about Resty capabilities</p>
|
5 | 5 | </p>
|
6 | 6 | <p align="center">
|
7 |
| -<p align="center"><a href="https://travis-ci.org/go-resty/resty"><img src="https://travis-ci.org/go-resty/resty.svg?branch=master" alt="Build Status"></a> <a href="https://codecov.io/gh/go-resty/resty/branch/master"><img src="https://codecov.io/gh/go-resty/resty/branch/master/graph/badge.svg" alt="Code Coverage"></a> <a href="https://goreportcard.com/report/go-resty/resty"><img src="https://goreportcard.com/badge/go-resty/resty" alt="Go Report Card"></a> <a href="https://github.com/go-resty/resty/releases/latest"><img src="https://img.shields.io/badge/version-2.5.0-blue.svg" alt="Release Version"></a> <a href="https://pkg.go.dev/github.com/go-resty/resty/v2"><img src="https://godoc.org/github.com/go-resty/resty?status.svg" alt="GoDoc"></a> <a href="LICENSE"><img src="https://img.shields.io/github/license/go-resty/resty.svg" alt="License"></a> <a href="https://github.com/avelino/awesome-go"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Go"></a></p> |
| 7 | +<p align="center"><a href="https://travis-ci.org/go-resty/resty"><img src="https://travis-ci.org/go-resty/resty.svg?branch=master" alt="Build Status"></a> <a href="https://codecov.io/gh/go-resty/resty/branch/master"><img src="https://codecov.io/gh/go-resty/resty/branch/master/graph/badge.svg" alt="Code Coverage"></a> <a href="https://goreportcard.com/report/go-resty/resty"><img src="https://goreportcard.com/badge/go-resty/resty" alt="Go Report Card"></a> <a href="https://github.com/go-resty/resty/releases/latest"><img src="https://img.shields.io/badge/version-2.6.0-blue.svg" alt="Release Version"></a> <a href="https://pkg.go.dev/github.com/go-resty/resty/v2"><img src="https://pkg.go.dev/badge/github.com/go-resty/resty" alt="GoDoc"></a> <a href="LICENSE"><img src="https://img.shields.io/github/license/go-resty/resty.svg" alt="License"></a> <a href="https://github.com/avelino/awesome-go"><img src="https://awesome.re/mentioned-badge.svg" alt="Mentioned in Awesome Go"></a></p> |
8 | 8 | </p>
|
9 | 9 | <p align="center">
|
10 | 10 | <h4 align="center">Resty Communication Channels</h4>
|
|
13 | 13 |
|
14 | 14 | ## News
|
15 | 15 |
|
16 |
| - * v2.5.0 [released](https://github.com/go-resty/resty/releases/tag/v2.5.0) and tagged on Feb 11, 2021. |
| 16 | + * v2.6.0 [released](https://github.com/go-resty/resty/releases/tag/v2.6.0) and tagged on Apr 09, 2021. |
17 | 17 | * v2.0.0 [released](https://github.com/go-resty/resty/releases/tag/v2.0.0) and tagged on Jul 16, 2019.
|
18 | 18 | * v1.12.0 [released](https://github.com/go-resty/resty/releases/tag/v1.12.0) and tagged on Feb 27, 2019.
|
19 | 19 | * v1.0 released and tagged on Sep 25, 2017. - Resty's first version was released on Sep 15, 2015 then it grew gradually as a very handy and helpful library. Its been a two years since first release. I'm very thankful to Resty users and its [contributors](https://github.com/go-resty/resty/graphs/contributors).
|
|
22 | 22 |
|
23 | 23 | * GET, POST, PUT, DELETE, HEAD, PATCH, OPTIONS, etc.
|
24 | 24 | * Simple and chainable methods for settings and request
|
25 |
| - * [Request](https://godoc.org/github.com/go-resty/resty#Request) Body can be `string`, `[]byte`, `struct`, `map`, `slice` and `io.Reader` too |
| 25 | + * [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Request) Body can be `string`, `[]byte`, `struct`, `map`, `slice` and `io.Reader` too |
26 | 26 | * Auto detects `Content-Type`
|
27 | 27 | * Buffer less processing for `io.Reader`
|
28 | 28 | * Native `*http.Request` instance may be accessed during middleware and request execution via `Request.RawRequest`
|
29 | 29 | * Request Body can be read multiple times via `Request.RawRequest.GetBody()`
|
30 |
| - * [Response](https://godoc.org/github.com/go-resty/resty#Response) object gives you more possibility |
| 30 | + * [Response](https://pkg.go.dev/github.com/go-resty/resty/v2#Response) object gives you more possibility |
31 | 31 | * Access as `[]byte` array - `response.Body()` OR Access as `string` - `response.String()`
|
32 | 32 | * Know your `response.Time()` and when we `response.ReceivedAt()`
|
33 | 33 | * Automatic marshal and unmarshal for `JSON` and `XML` content type
|
34 | 34 | * Default is `JSON`, if you supply `struct/map` without header `Content-Type`
|
35 | 35 | * For auto-unmarshal, refer to -
|
36 |
| - - Success scenario [Request.SetResult()](https://godoc.org/github.com/go-resty/resty#Request.SetResult) and [Response.Result()](https://godoc.org/github.com/go-resty/resty#Response.Result). |
37 |
| - - Error scenario [Request.SetError()](https://godoc.org/github.com/go-resty/resty#Request.SetError) and [Response.Error()](https://godoc.org/github.com/go-resty/resty#Response.Error). |
| 36 | + - Success scenario [Request.SetResult()](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetResult) and [Response.Result()](https://pkg.go.dev/github.com/go-resty/resty/v2#Response.Result). |
| 37 | + - Error scenario [Request.SetError()](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetError) and [Response.Error()](https://pkg.go.dev/github.com/go-resty/resty/v2#Response.Error). |
38 | 38 | - Supports [RFC7807](https://tools.ietf.org/html/rfc7807) - `application/problem+json` & `application/problem+xml`
|
39 | 39 | * Easy to upload one or more file(s) via `multipart/form-data`
|
40 | 40 | * Auto detects file content type
|
41 |
| - * Request URL [Path Params (aka URI Params)](https://godoc.org/github.com/go-resty/resty#Request.SetPathParams) |
| 41 | + * Request URL [Path Params (aka URI Params)](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetPathParams) |
42 | 42 | * Backoff Retry Mechanism with retry condition function [reference](retry_test.go)
|
43 |
| - * Resty client HTTP & REST [Request](https://godoc.org/github.com/go-resty/resty#Client.OnBeforeRequest) and [Response](https://godoc.org/github.com/go-resty/resty#Client.OnAfterResponse) middlewares |
| 43 | + * Resty client HTTP & REST [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.OnBeforeRequest) and [Response](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.OnAfterResponse) middlewares |
44 | 44 | * `Request.SetContext` supported
|
45 | 45 | * Authorization option of `BasicAuth` and `Bearer` token
|
46 | 46 | * Set request `ContentLength` value for all request or particular request
|
47 |
| - * Custom [Root Certificates](https://godoc.org/github.com/go-resty/resty#Client.SetRootCertificate) and Client [Certificates](https://godoc.org/github.com/go-resty/resty#Client.SetCertificates) |
48 |
| - * Download/Save HTTP response directly into File, like `curl -o` flag. See [SetOutputDirectory](https://godoc.org/github.com/go-resty/resty#Client.SetOutputDirectory) & [SetOutput](https://godoc.org/github.com/go-resty/resty#Request.SetOutput). |
| 47 | + * Custom [Root Certificates](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetRootCertificate) and Client [Certificates](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetCertificates) |
| 48 | + * Download/Save HTTP response directly into File, like `curl -o` flag. See [SetOutputDirectory](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetOutputDirectory) & [SetOutput](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.SetOutput). |
49 | 49 | * Cookies for your request and CookieJar support
|
50 | 50 | * SRV Record based request instead of Host URL
|
51 | 51 | * Client settings like `Timeout`, `RedirectPolicy`, `Proxy`, `TLSClientConfig`, `Transport`, etc.
|
52 |
| - * Optionally allows GET request with payload, see [SetAllowGetMethodPayload](https://godoc.org/github.com/go-resty/resty#Client.SetAllowGetMethodPayload) |
| 52 | + * Optionally allows GET request with payload, see [SetAllowGetMethodPayload](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetAllowGetMethodPayload) |
53 | 53 | * Supports registering external JSON library into resty, see [how to use](https://github.com/go-resty/resty/issues/76#issuecomment-314015250)
|
54 | 54 | * Exposes Response reader without reading response (no auto-unmarshaling) if need be, see [how to use](https://github.com/go-resty/resty/issues/87#issuecomment-322100604)
|
55 | 55 | * Option to specify expected `Content-Type` when response `Content-Type` header missing. Refer to [#92](https://github.com/go-resty/resty/issues/92)
|
56 | 56 | * Resty design
|
57 | 57 | * Have client level settings & options and also override at Request level if you want to
|
58 | 58 | * Request and Response middleware
|
59 | 59 | * Create Multiple clients if you want to `resty.New()`
|
60 |
| - * Supports `http.RoundTripper` implementation, see [SetTransport](https://godoc.org/github.com/go-resty/resty#Client.SetTransport) |
| 60 | + * Supports `http.RoundTripper` implementation, see [SetTransport](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.SetTransport) |
61 | 61 | * goroutine concurrent safe
|
62 |
| - * Resty Client trace, see [Client.EnableTrace](https://godoc.org/github.com/go-resty/resty#Client.EnableTrace) and [Request.EnableTrace](https://godoc.org/github.com/go-resty/resty#Request.EnableTrace) |
| 62 | + * Resty Client trace, see [Client.EnableTrace](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.EnableTrace) and [Request.EnableTrace](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.EnableTrace) |
63 | 63 | * Since v2.4.0, trace info contains a `RequestAttempt` value, and the `Request` object contains an `Attempt` attribute
|
64 | 64 | * Debug mode - clean and informative logging presentation
|
65 | 65 | * Gzip - Go does it automatically also resty has fallback handling too
|
|
78 | 78 | * Retry Mechanism [how to use](#retries)
|
79 | 79 | * Backoff Retry
|
80 | 80 | * Conditional Retry
|
| 81 | + * Since v2.6.0, Retry Hooks - [Client](https://pkg.go.dev/github.com/go-resty/resty/v2#Client.AddRetryHook), [Request](https://pkg.go.dev/github.com/go-resty/resty/v2#Request.AddRetryHook) |
81 | 82 | * SRV Record based request instead of Host URL [how to use](resty_test.go#L1412)
|
82 | 83 | * etc (upcoming - throw your idea's [here](https://github.com/go-resty/resty/issues)).
|
83 | 84 |
|
|
0 commit comments