From b61f45364a2f729165059cd3b411fd9dfeb0b969 Mon Sep 17 00:00:00 2001 From: Jeevanandam M Date: Thu, 25 Jan 2018 12:18:34 -0800 Subject: [PATCH] version and readme update for v1.1 release --- README.md | 20 ++++++++++++++++++-- resty.go | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1ef5b14e..182727a3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Resty [![Build Status](https://travis-ci.org/go-resty/resty.svg?branch=master)](https://travis-ci.org/go-resty/resty) [![codecov](https://codecov.io/gh/go-resty/resty/branch/master/graph/badge.svg)](https://codecov.io/gh/go-resty/resty/branch/master) [![GoReport](https://goreportcard.com/badge/go-resty/resty)](https://goreportcard.com/report/go-resty/resty) [![Version](https://img.shields.io/badge/version-1.0-blue.svg)](https://github.com/go-resty/resty/releases/latest) [![GoDoc](https://godoc.org/github.com/go-resty/resty?status.svg)](https://godoc.org/github.com/go-resty/resty) [![License](https://img.shields.io/github/license/go-resty/resty.svg)](LICENSE) +# Resty [![Build Status](https://travis-ci.org/go-resty/resty.svg?branch=master)](https://travis-ci.org/go-resty/resty) [![codecov](https://codecov.io/gh/go-resty/resty/branch/master/graph/badge.svg)](https://codecov.io/gh/go-resty/resty/branch/master) [![GoReport](https://goreportcard.com/badge/go-resty/resty)](https://goreportcard.com/report/go-resty/resty) [![Version](https://img.shields.io/badge/version-1.1-blue.svg)](https://github.com/go-resty/resty/releases/latest) [![GoDoc](https://godoc.org/github.com/go-resty/resty?status.svg)](https://godoc.org/github.com/go-resty/resty) [![License](https://img.shields.io/github/license/go-resty/resty.svg)](LICENSE) Simple HTTP and REST client for Go inspired by Ruby rest-client. [Features](#features) section describes in detail about Resty capabilities. -***v1.0 [released](https://github.com/go-resty/resty/releases/latest) and tagged on Sep 25, 2017.*** +***v1.1 [released](https://github.com/go-resty/resty/releases/latest) and tagged on Jan 25, 2018.*** *Since Go v1.6 HTTP/2 & HTTP/1.1 protocol is used transparently. `Resty` works fine with HTTP/2 and HTTP/1.1.* @@ -24,6 +24,8 @@ Resty first version released on Sep 15, 2015 then it grew gradually as a very ha - 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). - 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). * Easy to upload one or more file(s) via `multipart/form-data` + * Auto detects file content type + * Request URL [Path Params](https://godoc.org/github.com/go-resty/resty#Request.SetPathParams) * Backoff Retry Mechanism with retry condition function [reference](retry_test.go) * 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 * `Request.SetContext` supported `go1.7` and above @@ -359,6 +361,20 @@ _, err := resty.R(). Get("http://bit.ly/1LouEKr") ``` +#### Request URL Path Params +Resty provides easy to use dynamic request URL path params. Params can be set at client and request level. Client level params value can be overridden at request level. + +```go +resty.R().SetPathParams(map[string]string{ + "userId": "sample@sample.com", + "subAccountId": "100002", +}). +Get("/v1/users/{userId}/{subAccountId}/details") + +// Result: +// Composed URL - /v1/users/sample@sample.com/100002/details +``` + #### Request and Response Middleware Resty provides middleware ability to manipulate for Request and Response. It is more flexible than callback approach. ```go diff --git a/resty.go b/resty.go index eaf9029e..61fe0f78 100644 --- a/resty.go +++ b/resty.go @@ -6,4 +6,4 @@ package resty // Version # of resty -const Version = "1.1-edge" +const Version = "1.1"