diff --git a/README.md b/README.md index a67ac15..b447d50 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,23 @@ [![CircleCI](https://img.shields.io/circleci/project/github/koron-go/jsonhttpc/master.svg)](https://circleci.com/gh/koron-go/jsonhttpc/tree/master) [![Go Report Card](https://goreportcard.com/badge/github.com/koron-go/jsonhttpc)](https://goreportcard.com/report/github.com/koron-go/jsonhttpc) -JSONに特化したHTTPクライアントです。 +Package jsonhttpc provides JSON specialized HTTP Client. + +* request and response is encoded/decoded as JSON automatically. +* bit convenient for repeating requests. + * specify base URL - `WithBaseURL()` + * specify HTTP Client - `WithClient()` + * specify HTTP header - `WithHeader()` +* tips to customize requests - `Do()` + * `ContentType() string` on `body` overrides "Content-Type" header. + (default is "application/json") +* error response is decoded as JSON - `Error` + * Most of JSON properties are put into + `Properties map[string]interface{}` + * There are some fields for + [RFC7808 Problem Details for HTTP APIs][rfc7808] + +(Japanese) * リクエストとレスポンスは自動的にJSONエンコード/デコードされます * リクエストを繰り返し行うのに少し便利です @@ -19,4 +35,6 @@ JSONに特化したHTTPクライアントです。 * `Error.Properties` に `map[string]interface{}` で入ります * [RFC7808 Problem Details for HTTP APIs][rfc7808] は少し楽できます +## How to use + [rfc7808]:https://tools.ietf.org/html/rfc7807