URI Utilities

URI Utilities — Functions to help working with GUri and HTTP

Functions

Types and Values

Includes

#include <libsoup/soup.h>

Description

Utility functions and defines to help working with URIs.

Functions

soup_uri_equal ()

gboolean
soup_uri_equal (GUri *uri1,
                GUri *uri2);

Tests whether or not uri1 and uri2 are equal in all parts

Parameters

uri1

a GUri

 

uri2

another GUri

 

Returns

TRUE if equal otherwise FALSE


soup_uri_decode_data_uri ()

GBytes *
soup_uri_decode_data_uri (const char *uri,
                          char **content_type);

Decodes the given data URI and returns its contents and content_type .

Parameters

uri

a data URI, in string form

 

content_type

location to store content type, or NULL.

[out][nullable][transfer full]

Returns

a GBytes with the contents of uri , or NULL if uri is not a valid data URI.

[transfer full]


soup_uri_copy ()

GUri *
soup_uri_copy (GUri *uri,
               SoupURIComponent first_component,
               ...);

Return a copy of uri with the given components updated

[skip]

Parameters

uri

the GUri to copy

 

first_component

first SoupURIComponent to update

 

...

value of first_component followed by additional components and values, terminated by SOUP_URI_NONE

 

Returns

a new GUri.

[transfer full]

Types and Values

SOUP_HTTP_URI_FLAGS

#define SOUP_HTTP_URI_FLAGS (G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED_PATH | G_URI_FLAGS_ENCODED_QUERY | G_URI_FLAGS_ENCODED_FRAGMENT | G_URI_FLAGS_SCHEME_NORMALIZE)

The set of GUriFlags libsoup expects all GUri to use.


enum SoupURIComponent

Enum values passed to soup_uri_copy() to indicate the components of the URI that should be updated with the given values.

Members

SOUP_URI_NONE

no component

 

SOUP_URI_SCHEME

the URI scheme component

 

SOUP_URI_USER

the URI user component

 

SOUP_URI_PASSWORD

the URI password component

 

SOUP_URI_AUTH_PARAMS

the URI authentication parameters component

 

SOUP_URI_HOST

the URI host component

 

SOUP_URI_PORT

the URI port component

 

SOUP_URI_PATH

the URI path component

 

SOUP_URI_QUERY

the URI query component

 

SOUP_URI_FRAGMENT

the URI fragment component