add header to send right post request

This commit is contained in:
runzexia 2018-09-20 13:18:20 +08:00
parent 7b209809d2
commit fede6d970b
1 changed files with 3 additions and 0 deletions

View File

@ -61,6 +61,9 @@ func (b *Builder) build() (*http.Request, error) {
if err != nil {
return nil, err
}
if b.operation.RequestMethod == "POST"{
httpRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded")
}
logger.Info(fmt.Sprintf(
"Built QingCloud request: [%d] %s \n %s ",