GOWA - WhatsApp REST API with support for UI, Multi Account, Webhooks, and MCP, and Chatwoot. Built with Golang for efficient memory use.
Go botgogolanggolang-whatsappgolang-whatsapp-apirestrest-apiwhatsappwhatsapp-apiwhatsapp-api-gowhatsapp-multi-devicewhatsapp-web-multi-device
fix: axios webboundary (#5)
Aldino Kemal1eb92df2d18a
diff --git a/openapi.yaml b/openapi.yamlindex 46edd699..adaf3719 100644--- a/openapi.yaml+++ b/openapi.yaml@@ -406,7 +406,7 @@ paths:schema:type: objectproperties:- phone_number:+ phone:type: integerexample: '6289685024091'message:@@ -460,7 +460,7 @@ paths:type: objectexample:code: 400- message: 'phone_number: cannot be blank.'+ message: 'phone: cannot be blank.'results: null'500':description: Internal Server Error@@ -496,7 +496,7 @@ paths:schema:type: objectproperties:- phone_number:+ phone:type: integerexample: '6289685024091'caption:@@ -556,7 +556,7 @@ paths:type: objectexample:code: 400- message: 'phone_number: cannot be blank.'+ message: 'phone: cannot be blank.'results: null'500':description: Internal Server Error@@ -592,7 +592,7 @@ paths:schema:type: objectproperties:- phone_number:+ phone:type: integerexample: '6289685024091'caption:@@ -652,7 +652,7 @@ paths:type: objectexample:code: 400- message: 'phone_number: cannot be blank.'+ message: 'phone: cannot be blank.'results: null'500':description: Internal Server Errordiff --git a/views/index.html b/views/index.htmlindex e2a1c2c8..2ecba8d4 100644--- a/views/index.html+++ b/views/index.html@@ -529,7 +529,13 @@payload.append("phone", this.message_phone)payload.append("message", this.message_text)payload.append("type", this.message_type)- let response = await axios.post(`${this.app_host}/send/message`, payload)+ let response = await axios.post(`${this.app_host}/send/message`, payload, {+ // Axios Bug, always content-type that make boundary not set default by browser https://github.com/axios/axios/issues/1603+ transformRequest: (data, headers) => {+ delete headers.post['Content-Type'];+ return data;+ }+ })this.sendMessageReset();resolve(response.data.message)} catch (error) {@@ -578,7 +584,13 @@payload.append("caption", this.image_caption)payload.append("image", $("#image_file")[0].files[0])payload.append("type", this.image_type)- let response = await axios.post(`${this.app_host}/send/image`, payload)+ let response = await axios.post(`${this.app_host}/send/image`, payload, {+ // Axios Bug, always content-type that make boundary not set default by browser https://github.com/axios/axios/issues/1603+ transformRequest: (data, headers) => {+ delete headers.post['Content-Type'];+ return data;+ }+ })this.sendImageReset();resolve(response.data.message)} catch (error) {@@ -626,7 +638,13 @@payload.append("phone", this.file_phone)payload.append("file", $("#file_file")[0].files[0])payload.append("type", this.file_type)- let response = await axios.post(`${this.app_host}/send/file`, payload)+ let response = await axios.post(`${this.app_host}/send/file`, payload, {+ // Axios Bug, always content-type that make boundary not set default by browser https://github.com/axios/axios/issues/1603+ transformRequest: (data, headers) => {+ delete headers.post['Content-Type'];+ return data;+ }+ })this.sendFileReset();resolve(response.data.message)} catch (error) {