diff --git a/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/api/export/core/RequestClassExporter.kt b/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/api/export/core/RequestClassExporter.kt index 9b34cef3..7a7ff30b 100644 --- a/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/api/export/core/RequestClassExporter.kt +++ b/idea-plugin/src/main/kotlin/com/itangcent/idea/plugin/api/export/core/RequestClassExporter.kt @@ -562,12 +562,13 @@ abstract class RequestClassExporter : ClassExporter { ) } - if (request.hasBodyOrForm()) { - requestBuilderListener.addHeaderIfMissed( - methodExportContext, - request, "Content-Type", "application/x-www-form-urlencoded" - ) - } + // no longer need to set content-type here + //if (request.hasBodyOrForm()) { + // requestBuilderListener.addHeaderIfMissed( + // methodExportContext, + // request, "Content-Type", "application/x-www-form-urlencoded" + // ) + //} } diff --git a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.CustomizedDirectorySpringMarkdownApiExporterTest.txt b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.CustomizedDirectorySpringMarkdownApiExporterTest.txt index 804b88e2..323831ec 100644 --- a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.CustomizedDirectorySpringMarkdownApiExporterTest.txt +++ b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.CustomizedDirectorySpringMarkdownApiExporterTest.txt @@ -750,7 +750,6 @@ test apis | `name` | `value` | `desc` | | ------------ | ------------ | ----: | -| Content-Type | application/x-www-form-urlencoded | | | token | | auth token | @@ -799,7 +798,6 @@ test apis | `name` | `value` | `desc` | | ------------ | ------------ | ----: | -| Content-Type | application/x-www-form-urlencoded | | | token | | auth token | diff --git a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.DirectorySpringMarkdownApiExporterTest.txt b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.DirectorySpringMarkdownApiExporterTest.txt index 60d6e6e3..c013ec34 100644 --- a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.DirectorySpringMarkdownApiExporterTest.txt +++ b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.markdown.MarkdownApiExporterTest.DirectorySpringMarkdownApiExporterTest.txt @@ -748,7 +748,6 @@ test apis | name | value | required | desc | | ------------ | ------------ | ------------ | ------------ | -| Content-Type | application/x-www-form-urlencoded | YES | | | token | | YES | auth token | @@ -797,7 +796,6 @@ test apis | name | value | required | desc | | ------------ | ------------ | ------------ | ------------ | -| Content-Type | application/x-www-form-urlencoded | YES | | | token | | YES | auth token | diff --git a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.postman.PostmanApiExporterTest.DirectorySpringPostmanApiExporterTest.txt b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.postman.PostmanApiExporterTest.DirectorySpringPostmanApiExporterTest.txt index 119d2958..a7674646 100644 --- a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.postman.PostmanApiExporterTest.DirectorySpringPostmanApiExporterTest.txt +++ b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.postman.PostmanApiExporterTest.DirectorySpringPostmanApiExporterTest.txt @@ -1421,12 +1421,6 @@ "method": "POST", "description": "", "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded", - "type": "text", - "description": "" - }, { "key": "token", "value": "", @@ -1454,12 +1448,6 @@ "method": "POST", "description": "", "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded", - "type": "text", - "description": "" - }, { "key": "token", "value": "", @@ -1517,12 +1505,6 @@ "method": "POST", "description": "", "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded", - "type": "text", - "description": "" - }, { "key": "token", "value": "", @@ -1550,12 +1532,6 @@ "method": "POST", "description": "", "header": [ - { - "key": "Content-Type", - "value": "application/x-www-form-urlencoded", - "type": "text", - "description": "" - }, { "key": "token", "value": "", diff --git a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.yapi.YapiApiExporterTest.DirectorySpringYapiApiExporterTest.txt b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.yapi.YapiApiExporterTest.DirectorySpringYapiApiExporterTest.txt index 03c27edf..6579a453 100644 --- a/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.yapi.YapiApiExporterTest.DirectorySpringYapiApiExporterTest.txt +++ b/idea-plugin/src/test/resources/result/com.itangcent.idea.plugin.api.export.yapi.YapiApiExporterTest.DirectorySpringYapiApiExporterTest.txt @@ -486,12 +486,6 @@ "__v": 0, "markdown": "", "req_headers": [ - { - "name": "Content-Type", - "value": "application/x-www-form-urlencoded", - "example": "application/x-www-form-urlencoded", - "required": 1 - }, { "name": "token", "value": "", @@ -528,12 +522,6 @@ "__v": 0, "markdown": "", "req_headers": [ - { - "name": "Content-Type", - "value": "application/x-www-form-urlencoded", - "example": "application/x-www-form-urlencoded", - "required": 1 - }, { "name": "token", "value": "",