All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cpprest.multipart-header.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{>licenseInfo}}
/*
 * MultipartFormData.h
 *
 * This class represents a container for building a application/x-multipart-formdata requests.
 */

#ifndef {{modelHeaderGuardPrefix}}_MultipartFormData_H_
#define {{modelHeaderGuardPrefix}}_MultipartFormData_H_

{{{defaultInclude}}}
#include "IHttpBody.h"
#include "HttpContent.h"

#include 
#include 
#include 

#include 


{{#modelNamespaceDeclarations}}
namespace {{this}} {
{{/modelNamespaceDeclarations}}

class {{declspec}} MultipartFormData
    : public IHttpBody
{
public:
    MultipartFormData();
    MultipartFormData(const utility::string_t& boundary);
    virtual ~MultipartFormData();

    virtual void add( std::shared_ptr content );
    virtual utility::string_t getBoundary();
    virtual std::shared_ptr getContent(const utility::string_t& name) const;
    virtual bool hasContent(const utility::string_t& name) const;
    virtual void writeTo( std::ostream& target );

protected:
    std::vector> m_Contents;
    utility::string_t m_Boundary;
    std::map> m_ContentLookup;
};

{{#modelNamespaceDeclarations}}
}
{{/modelNamespaceDeclarations}}

#endif /* {{modelHeaderGuardPrefix}}_MultipartFormData_H_ */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy