Skip to content

Commit

Permalink
Merge pull request #112 from yunify/add-post-header
Browse files Browse the repository at this point in the history
add header to send right post request
  • Loading branch information
Sunight authored Sep 20, 2018
2 parents 7b20980 + fede6d9 commit 3692eeb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions request/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand Down

0 comments on commit 3692eeb

Please sign in to comment.