Package org.gnome.soup


package org.gnome.soup
An HTTP client/server library for GNOME

The following native libraries are required and will be loaded: libsoup-3.0.so

For namespace-global declarations, refer to the Soup class documentation.

This package is only available on linux.

Soup-method

soup-method.h contains a number of defines for standard HTTP and WebDAV headers. You do not need to use these defines; you can pass arbitrary strings to soup_message_new() if you prefer.

The thing that these defines <emphasis>are</emphasis> useful for is performing quick comparisons against soup_message_get_method(); because SoupMessage always contains an interned string, and these macros return interned strings, you can compare methods directly against these macros rather than needing to use strcmp(). This is most useful in SoupServer handlers. Eg:

<informalexample><programlisting> if (soup_message_get_method (msg) != SOUP_METHOD_GET &amp;&amp; soup_message_get_method (msg) != SOUP_METHOD_HEAD) { soup_message_set_status (msg, SOUP_METHOD_NOT_IMPLEMENTED); return; } </programlisting></informalexample>