Function

Soupheaders_parse_response

Declaration [src]

gboolean
soup_headers_parse_response (
  const char* str,
  int len,
  SoupMessageHeaders* headers,
  SoupHTTPVersion* ver,
  guint* status_code,
  char** reason_phrase
)

Description [src]

Parses the headers of an HTTP response in str and stores the results in ver, status_code, reason_phrase, and headers.

Beware that headers may be modified even on failure.

Parameters

str const char*
 

The headers (up to, but not including, the trailing blank line)

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
len int
 

Length of str.

headers SoupMessageHeaders
 

SoupMessageHeaders to store the header values in.

 The data is owned by the caller of the function.
ver SoupHTTPVersion
 

If non-NULL, will be filled in with the HTTP version.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
status_code guint*
 

If non-NULL, will be filled in with the status code.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
reason_phrase char**
 

If non-NULL, will be filled in with the reason phrase.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.

Return value

Returns: gboolean
 

Success or failure.