Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
koron committed Feb 10, 2020
1 parent 1d5c20f commit f157f8c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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エンコード/デコードされます
* リクエストを繰り返し行うのに少し便利です
Expand All @@ -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

0 comments on commit f157f8c

Please sign in to comment.