forked from TrueCloudLab/lego
Update iij version to remove CRLF (#635)
This commit is contained in:
parent
088c707d4c
commit
839b137761
9 changed files with 340 additions and 334 deletions
4
Gopkg.lock
generated
4
Gopkg.lock
generated
|
@ -223,14 +223,14 @@
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
digest = "1:fed64c975620bacb8b3e531e31974149eef07fa0c4bc99185d35c4beaa6bd98a"
|
digest = "1:c45e4f1755487478216e06437e161d56299d963282ce109555091bc4c7a57343"
|
||||||
name = "github.com/iij/doapi"
|
name = "github.com/iij/doapi"
|
||||||
packages = [
|
packages = [
|
||||||
".",
|
".",
|
||||||
"protocol",
|
"protocol",
|
||||||
]
|
]
|
||||||
pruneopts = "NUT"
|
pruneopts = "NUT"
|
||||||
revision = "afe9fa11fb27e5e8ab2dfc1675e91387aa63eaa2"
|
revision = "8803795a9b7b938fa88ddbd63a77893beee14cd8"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
digest = "1:ac6d01547ec4f7f673311b4663909269bfb8249952de3279799289467837c3cc"
|
digest = "1:ac6d01547ec4f7f673311b4663909269bfb8249952de3279799289467837c3cc"
|
||||||
|
|
6
vendor/github.com/iij/doapi/api.go
generated
vendored
6
vendor/github.com/iij/doapi/api.go
generated
vendored
|
@ -140,6 +140,9 @@ func (a API) PostSome(method string, param url.URL, body interface{}) (resp *htt
|
||||||
if body != nil {
|
if body != nil {
|
||||||
var bufb []byte
|
var bufb []byte
|
||||||
bufb, err = json.Marshal(body)
|
bufb, err = json.Marshal(body)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if len(bufb) > 2 {
|
if len(bufb) > 2 {
|
||||||
log.Debug("call with body", method, string(bufb))
|
log.Debug("call with body", method, string(bufb))
|
||||||
buf = bytes.NewBuffer(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("")
|
buf = bytes.NewBufferString("")
|
||||||
}
|
}
|
||||||
req, err := http.NewRequest(method, param.String(), buf)
|
req, err := http.NewRequest(method, param.String(), buf)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
if body != nil {
|
if body != nil {
|
||||||
req.Header.Add("content-type", PostContentType)
|
req.Header.Add("content-type", PostContentType)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue