Update iij version to remove CRLF (#635)

This commit is contained in:
NicoMen 2018-09-13 09:54:16 +02:00 committed by Ludovic Fernandez
parent 088c707d4c
commit 839b137761
9 changed files with 340 additions and 334 deletions

4
Gopkg.lock generated
View file

@ -223,14 +223,14 @@
[[projects]]
branch = "master"
digest = "1:fed64c975620bacb8b3e531e31974149eef07fa0c4bc99185d35c4beaa6bd98a"
digest = "1:c45e4f1755487478216e06437e161d56299d963282ce109555091bc4c7a57343"
name = "github.com/iij/doapi"
packages = [
".",
"protocol",
]
pruneopts = "NUT"
revision = "afe9fa11fb27e5e8ab2dfc1675e91387aa63eaa2"
revision = "8803795a9b7b938fa88ddbd63a77893beee14cd8"
[[projects]]
digest = "1:ac6d01547ec4f7f673311b4663909269bfb8249952de3279799289467837c3cc"

16
vendor/github.com/iij/doapi/api.go generated vendored
View file

@ -22,11 +22,11 @@ import (
)
const (
HmacSHA1 = "HmacSHA1"
HmacSHA256 = "HmacSHA256"
SignatureVersion2 = "2"
APIVersion = "20140601"
EndpointJSON = "https://do.api.iij.jp/"
HmacSHA1 = "HmacSHA1"
HmacSHA256 = "HmacSHA256"
SignatureVersion2 = "2"
APIVersion = "20140601"
EndpointJSON = "https://do.api.iij.jp/"
// EndpointJSON = "http://localhost:9999/"
TimeLayout = "2006-01-02T15:04:05Z"
PostContentType = "application/json"
@ -140,6 +140,9 @@ func (a API) PostSome(method string, param url.URL, body interface{}) (resp *htt
if body != nil {
var bufb []byte
bufb, err = json.Marshal(body)
if err != nil {
return nil, err
}
if len(bufb) > 2 {
log.Debug("call with body", method, string(bufb))
buf = bytes.NewBuffer(bufb)
@ -154,6 +157,9 @@ func (a API) PostSome(method string, param url.URL, body interface{}) (resp *htt
buf = bytes.NewBufferString("")
}
req, err := http.NewRequest(method, param.String(), buf)
if err != nil {
return nil, err
}
if body != nil {
req.Header.Add("content-type", PostContentType)
}