forked from loafle/openapi-generator-original
* []c++[cpprest]fix some constness and invalid access to null entities * update petstore sample
54 lines
1.5 KiB
Plaintext
Vendored
54 lines
1.5 KiB
Plaintext
Vendored
{{>licenseInfo}}
|
|
/*
|
|
* ApiConfiguration.h
|
|
*
|
|
* This class represents a single item of a multipart-formdata request.
|
|
*/
|
|
|
|
#ifndef {{apiHeaderGuardPrefix}}_ApiConfiguration_H_
|
|
#define {{apiHeaderGuardPrefix}}_ApiConfiguration_H_
|
|
|
|
{{{defaultInclude}}}
|
|
|
|
#include <map>
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
#include <cpprest/http_client.h>
|
|
{{#apiNamespaceDeclarations}}
|
|
namespace {{this}} {
|
|
{{/apiNamespaceDeclarations}}
|
|
|
|
class {{declspec}} ApiConfiguration
|
|
{
|
|
public:
|
|
ApiConfiguration();
|
|
virtual ~ApiConfiguration();
|
|
|
|
const web::http::client::http_client_config& getHttpConfig() const;
|
|
void setHttpConfig( web::http::client::http_client_config& value );
|
|
|
|
utility::string_t getBaseUrl() const;
|
|
void setBaseUrl( const utility::string_t value );
|
|
|
|
utility::string_t getUserAgent() const;
|
|
void setUserAgent( const utility::string_t value );
|
|
|
|
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
|
|
const std::map<utility::string_t, utility::string_t>& getDefaultHeaders() const;
|
|
|
|
utility::string_t getApiKey( const utility::string_t& prefix) const;
|
|
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
|
|
|
|
protected:
|
|
utility::string_t m_BaseUrl;
|
|
std::map<utility::string_t, utility::string_t> m_DefaultHeaders;
|
|
std::map<utility::string_t, utility::string_t> m_ApiKeys;
|
|
web::http::client::http_client_config m_HttpConfig;
|
|
utility::string_t m_UserAgent;
|
|
};
|
|
|
|
{{#apiNamespaceDeclarations}}
|
|
}
|
|
{{/apiNamespaceDeclarations}}
|
|
#endif /* {{apiHeaderGuardPrefix}}_ApiConfiguration_H_ */
|