第三方api接口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

api.go 583 B

10 months ago
1234567891011121314151617181920
  1. package playlet_bihai
  2. import (
  3. zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
  4. "fmt"
  5. )
  6. func SendPost(method string, token string, param map[string]string) (string, error) {
  7. url := "https://distributionapi.qinronmedia.com/" + method
  8. header := map[string]string{}
  9. if token != "" {
  10. header = map[string]string{
  11. "Authorization": "Bearer " + token,
  12. }
  13. }
  14. get, err := zhios_third_party_utils.CurlPost(url, zhios_third_party_utils.SerializeStr(param), header)
  15. fmt.Println(string(get))
  16. fmt.Println(err)
  17. return string(get), err
  18. }