Browse Source
Merge pull request #349 from gdlcf88/fix-naming
Rename to `determineHTTPRequestMethod`
pull/350/head
yedf2
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
dtmsvr/trans_status.go
|
|
|
@ -141,14 +141,14 @@ func (t *TransGlobal) getHTTPResult(uri string, branchID, op string, branchPaylo |
|
|
|
SetHeader("Content-type", "application/json"). |
|
|
|
SetHeaders(t.Ext.Headers). |
|
|
|
SetHeaders(t.TransOptions.BranchHeaders). |
|
|
|
Execute(t.determineHttpRequestMethod(branchPayload), uri) |
|
|
|
Execute(t.determineHTTPRequestMethod(branchPayload), uri) |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
} |
|
|
|
return dtmcli.HTTPResp2DtmError(resp) |
|
|
|
} |
|
|
|
|
|
|
|
func (t *TransGlobal) determineHttpRequestMethod(branchPayload []byte) string { |
|
|
|
func (t *TransGlobal) determineHTTPRequestMethod(branchPayload []byte) string { |
|
|
|
return dtmimp.If(len(branchPayload) != 0 || t.TransType == "xa", "POST", "GET").(string) |
|
|
|
} |
|
|
|
|
|
|
|
|