Function setContentTypeCodeAndCustomString

Summary

#include <lib/inc/drogon/HttpResponse.h>

(1) void setContentTypeCodeAndCustomString(ContentType type, const string_view &typeString)

(2) template <int N>
    void setContentTypeCodeAndCustomString(ContentType type, const char(&typeString)[N])

(3) virtual void setContentTypeCodeAndCustomString(ContentType type, const char *typeString, size_t typeStringLength)=0

Function overload

Synopsis

#include <lib/inc/drogon/HttpResponse.h>

void setContentTypeCodeAndCustomString(ContentType type, const string_view &typeString)

Description

Set the response content type and the content-type string, The string must contain the header name and CRLF. For example, "content-type: text/plain\r\n"

Source

Lines 137-143 in lib/inc/drogon/HttpResponse.h.

void setContentTypeCodeAndCustomString(ContentType type,
                                       const string_view &typeString)
{
    setContentTypeCodeAndCustomString(type,
                                      typeString.data(),
                                      typeString.length());
}

Synopsis

#include <lib/inc/drogon/HttpResponse.h>

template <int N>
void setContentTypeCodeAndCustomString(ContentType type, const char(&typeString)[N])

Description

No description yet.

Source

Lines 144-150 in lib/inc/drogon/HttpResponse.h.

template <int N>
void setContentTypeCodeAndCustomString(ContentType type,
                                       const char (&typeString)[N])
{
    assert(N > 0);
    setContentTypeCodeAndCustomString(type, typeString, N - 1);
}

Synopsis

#include <lib/inc/drogon/HttpResponse.h>

virtual void setContentTypeCodeAndCustomString(ContentType type, const char *typeString, size_t typeStringLength)=0

Description

No description yet.

Source

Line 365 in lib/inc/drogon/HttpResponse.h.






Add Discussion as Guest

Log in to DocsForge