File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
modules/swagger-codegen/src/main/resources/qt5cpp Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,15 @@ void
112
112
{ {/isContainer} }{ {/bodyParams} }
113
113
114
114
{ {#headerParams} }
115
- // TODO: add header support
115
+ if ({ {paramName} } != nullptr) {
116
+ input.headers.insert (" {{baseName}}" , " {{paramName}}" );
117
+ }
116
118
{ {/headerParams} }
117
119
120
+ foreach(QString key, this->defaultHeaders.keys()) {
121
+ input.headers.insert (key, this-> defaultHeaders .value(key));
122
+ }
123
+
118
124
connect(worker,
119
125
&HttpRequestWorker::on_execution_finished,
120
126
this,
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public:
23
23
24
24
QString host;
25
25
QString basePath;
26
+ QMap<QString , QString > defaultHeaders;
26
27
27
28
{ {#operations} }{ {#operation} }void { {nickname} }({ {#allParams} }{ {{dataType} }} { {paramName} }{ {#hasMore} }, { {/hasMore} }{ {/allParams} });
28
29
{ {/operation} }{ {/operations} }
You can’t perform that action at this time.
0 commit comments