From aeeadc95e1b1218a85f3b48da8dc5b4b57aeb219 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期一, 24 五月 2021 18:43:02 +0800
Subject: [PATCH] add GetVssChannel
---
httpClient.go | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/httpClient.go b/httpClient.go
index 2cdca21..b4a21c7 100644
--- a/httpClient.go
+++ b/httpClient.go
@@ -140,7 +140,7 @@
}
//鏋勯�燿elete璇锋眰
-func (httpApi HttpClient) DoDeleteRequest(url string, contentType string, body map[string]interface{}, headers map[string]string) ([]byte, error) {
+func (httpApi HttpClient) DoDeleteRequest(url string, contentType string, body map[string]interface{}, params map[string]string, headers map[string]string) ([]byte, error) {
var resultBytes []byte
var bodyJson []byte
if body != nil {
@@ -156,6 +156,14 @@
return resultBytes, err
}
request.Header.Set("Content-type", contentType)
+ //add params
+ q := request.URL.Query()
+ if params != nil {
+ for key, val := range params {
+ q.Add(key, val)
+ }
+ request.URL.RawQuery = q.Encode()
+ }
// add headers
if headers != nil {
for key, val := range headers {
--
Gitblit v1.8.0