1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-24 18:15:16 +00:00
harbour-sailfin/core/codegen/loader_header.hbs
Chris Josten 96ecd8e7d8 Refractor ApiClient and add support for body params
ApiClient was refractored to use PIMPL. This is mainly done to reduce
compile times whenever the implementation of ApiClient itself changes,
since a lot of files include it.

The loaders have gained support for body parameters, this was somehow
omitted before.
2021-09-03 03:47:25 +02:00

26 lines
736 B
Handlebars

using namespace {{dtoNamespace}};
{{#each endpoints as |e|}}
{{#if e.endpoint.hasSuccessResponse}}
{{#if e.endpoint.description.length > 0}}
/**
* @brief {{e.endpoint.description}}
*/
{{/if}}
class {{e.className}}Loader : public {{supportNamespace}}::HttpLoader<{{e.endpoint.resultType}}, {{e.endpoint.parameterType}}> {
public:
explicit {{e.className}}Loader(ApiClient *apiClient = nullptr);
protected:
QString path(const {{e.endpoint.parameterType}}& parameters) const override;
QUrlQuery query(const {{e.endpoint.parameterType}}& parameters) const override;
QByteArray body(const {{e.endpoint.parameterType}}& parameters) const override;
QNetworkAccessManager::Operation operation() const override;
};
{{/if}}
{{/each}}