Delta Chat Core C Interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_http_response_t Class Reference

An object containing an HTTP(S) GET response. More...

#include <deltachat.h>

Public Member Functions

uint8_t * dc_http_response_get_blob (const dc_http_response_t *response)
 Returns HTTP response contents.
 
char * dc_http_response_get_encoding (const dc_http_response_t *response)
 Returns HTTP response encoding, e.g.
 
char * dc_http_response_get_mimetype (const dc_http_response_t *response)
 Returns HTTP response MIME type as a string, e.g.
 
size_t dc_http_response_get_size (const dc_http_response_t *response)
 Returns HTTP response content size.
 
void dc_http_response_unref (const dc_http_response_t *response)
 Free an HTTP response object.
 

Detailed Description

An object containing an HTTP(S) GET response.

Created by dc_get_http_response().

Member Function Documentation

◆ dc_http_response_get_blob()

uint8_t * dc_http_response_get_blob ( const dc_http_response_t response)

Returns HTTP response contents.

Parameters
responseHTTP response as returned by dc_get_http_response().
Returns
The blob which must be released using dc_str_unref() after usage. NULL is never returned.

◆ dc_http_response_get_encoding()

char * dc_http_response_get_encoding ( const dc_http_response_t response)

Returns HTTP response encoding, e.g.

"utf-8".

Parameters
responseHTTP response as returned by dc_get_http_response().
Returns
The string which must be released using dc_str_unref() after usage. May be NULL.

◆ dc_http_response_get_mimetype()

char * dc_http_response_get_mimetype ( const dc_http_response_t response)

Returns HTTP response MIME type as a string, e.g.

"text/plain" or "text/html".

Parameters
responseHTTP response as returned by dc_get_http_response().
Returns
The string which must be released using dc_str_unref() after usage. May be NULL.

◆ dc_http_response_get_size()

size_t dc_http_response_get_size ( const dc_http_response_t response)

Returns HTTP response content size.

Parameters
responseHTTP response as returned by dc_get_http_response().
Returns
The blob size.

◆ dc_http_response_unref()

void dc_http_response_unref ( const dc_http_response_t response)

Free an HTTP response object.

Parameters
responseHTTP response as returned by dc_get_http_response().

The documentation for this class was generated from the following file: