Merge pull request #112 from yunify/add-post-header
add header to send right post request
This commit is contained in:
commit
3692eebc9e
|
@ -61,6 +61,9 @@ func (b *Builder) build() (*http.Request, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if b.operation.RequestMethod == "POST"{
|
||||||
|
httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||||
|
}
|
||||||
|
|
||||||
logger.Info(fmt.Sprintf(
|
logger.Info(fmt.Sprintf(
|
||||||
"Built QingCloud request: [%d] %s \n %s ",
|
"Built QingCloud request: [%d] %s \n %s ",
|
||||||
|
|
Loading…
Reference in New Issue