Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>soup-method: libsoup Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="SoupMessageBody.html" title="SoupMessageBody">
<link rel="next" href="libsoup-2.4-Soup-Miscellaneous-Utilities.html" title="Soup Miscellaneous Utilities">
<meta name="generator" content="GTK-Doc V1.28.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libsoup-2.4-soup-method.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="SoupMessageBody.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libsoup-2.4-Soup-Miscellaneous-Utilities.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libsoup-2.4-soup-method"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libsoup-2.4-soup-method.top_of_page"></a>soup-method</span></h2>
<p>soup-method — HTTP method definitions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libsoup-2.4-soup-method.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-OPTIONS:CAPS" title="SOUP_METHOD_OPTIONS">SOUP_METHOD_OPTIONS</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-GET:CAPS" title="SOUP_METHOD_GET">SOUP_METHOD_GET</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-HEAD:CAPS" title="SOUP_METHOD_HEAD">SOUP_METHOD_HEAD</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-PUT:CAPS" title="SOUP_METHOD_PUT">SOUP_METHOD_PUT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-POST:CAPS" title="SOUP_METHOD_POST">SOUP_METHOD_POST</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-DELETE:CAPS" title="SOUP_METHOD_DELETE">SOUP_METHOD_DELETE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-TRACE:CAPS" title="SOUP_METHOD_TRACE">SOUP_METHOD_TRACE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-CONNECT:CAPS" title="SOUP_METHOD_CONNECT">SOUP_METHOD_CONNECT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-PROPFIND:CAPS" title="SOUP_METHOD_PROPFIND">SOUP_METHOD_PROPFIND</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-PROPPATCH:CAPS" title="SOUP_METHOD_PROPPATCH">SOUP_METHOD_PROPPATCH</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-MKCOL:CAPS" title="SOUP_METHOD_MKCOL">SOUP_METHOD_MKCOL</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-COPY:CAPS" title="SOUP_METHOD_COPY">SOUP_METHOD_COPY</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-MOVE:CAPS" title="SOUP_METHOD_MOVE">SOUP_METHOD_MOVE</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-LOCK:CAPS" title="SOUP_METHOD_LOCK">SOUP_METHOD_LOCK</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-soup-method.html#SOUP-METHOD-UNLOCK:CAPS" title="SOUP_METHOD_UNLOCK">SOUP_METHOD_UNLOCK</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libsoup-2.4-soup-method.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libsoup/soup.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libsoup-2.4-soup-method.description"></a><h2>Description</h2>
<p>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 <a class="link" href="SoupMessage.html#soup-message-new" title="soup_message_new ()"><code class="function">soup_message_new()</code></a> if you prefer.</p>
<p>The thing that these defines <span class="emphasis"><em>are</em></span> useful for is
performing quick comparisons against <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>'s <code class="literal">method</code> field;
because that field always contains an interned string, and these
macros return interned strings, you can compare <code class="literal">method</code> directly
against these macros rather than needing to use <code class="function">strcmp()</code>. This is
most useful in SoupServer handlers. Eg:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="keyword">if</span> <span class="gtkdoc opt">(</span>msg<span class="gtkdoc opt">-&gt;</span>method <span class="gtkdoc opt">!=</span> SOUP_METHOD_GET <span class="gtkdoc opt">&amp;&amp;</span> msg<span class="gtkdoc opt">-&gt;</span>method <span class="gtkdoc opt">!=</span> SOUP_METHOD_HEAD<span class="gtkdoc opt">) {</span>
	<span class="function"><a href="SoupMessage.html#soup-message-set-status">soup_message_set_status</a></span> <span class="gtkdoc opt">(</span>msg<span class="gtkdoc opt">,</span> SOUP_METHOD_NOT_IMPLEMENTED<span class="gtkdoc opt">);</span>
	<span class="keyword">return</span><span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<div class="refsect1">
<a name="libsoup-2.4-soup-method.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="libsoup-2.4-soup-method.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="SOUP-METHOD-OPTIONS:CAPS"></a><h3>SOUP_METHOD_OPTIONS</h3>
<pre class="programlisting">#define SOUP_METHOD_OPTIONS   _SOUP_INTERN_METHOD (OPTIONS)
</pre>
<p>"OPTIONS" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-GET:CAPS"></a><h3>SOUP_METHOD_GET</h3>
<pre class="programlisting">#define SOUP_METHOD_GET       _SOUP_INTERN_METHOD (GET)
</pre>
<p>"GET" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-HEAD:CAPS"></a><h3>SOUP_METHOD_HEAD</h3>
<pre class="programlisting">#define SOUP_METHOD_HEAD      _SOUP_INTERN_METHOD (HEAD)
</pre>
<p>"HEAD" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-PUT:CAPS"></a><h3>SOUP_METHOD_PUT</h3>
<pre class="programlisting">#define SOUP_METHOD_PUT       _SOUP_INTERN_METHOD (PUT)
</pre>
<p>"PUT" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-POST:CAPS"></a><h3>SOUP_METHOD_POST</h3>
<pre class="programlisting">#define SOUP_METHOD_POST      _SOUP_INTERN_METHOD (POST)
</pre>
<p>"POST" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-DELETE:CAPS"></a><h3>SOUP_METHOD_DELETE</h3>
<pre class="programlisting">#define SOUP_METHOD_DELETE    _SOUP_INTERN_METHOD (DELETE)
</pre>
<p>"DELETE" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-TRACE:CAPS"></a><h3>SOUP_METHOD_TRACE</h3>
<pre class="programlisting">#define SOUP_METHOD_TRACE     _SOUP_INTERN_METHOD (TRACE)
</pre>
<p>"TRACE" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-CONNECT:CAPS"></a><h3>SOUP_METHOD_CONNECT</h3>
<pre class="programlisting">#define SOUP_METHOD_CONNECT   _SOUP_INTERN_METHOD (CONNECT)
</pre>
<p>"CONNECT" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-PROPFIND:CAPS"></a><h3>SOUP_METHOD_PROPFIND</h3>
<pre class="programlisting">#define SOUP_METHOD_PROPFIND  _SOUP_INTERN_METHOD (PROPFIND)
</pre>
<p>"PROPFIND" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-PROPPATCH:CAPS"></a><h3>SOUP_METHOD_PROPPATCH</h3>
<pre class="programlisting">#define SOUP_METHOD_PROPPATCH _SOUP_INTERN_METHOD (PROPPATCH)
</pre>
<p>"PROPPATCH" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-MKCOL:CAPS"></a><h3>SOUP_METHOD_MKCOL</h3>
<pre class="programlisting">#define SOUP_METHOD_MKCOL     _SOUP_INTERN_METHOD (MKCOL)
</pre>
<p>"MKCOL" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-COPY:CAPS"></a><h3>SOUP_METHOD_COPY</h3>
<pre class="programlisting">#define SOUP_METHOD_COPY      _SOUP_INTERN_METHOD (COPY)
</pre>
<p>"COPY" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-MOVE:CAPS"></a><h3>SOUP_METHOD_MOVE</h3>
<pre class="programlisting">#define SOUP_METHOD_MOVE      _SOUP_INTERN_METHOD (MOVE)
</pre>
<p>"MOVE" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-LOCK:CAPS"></a><h3>SOUP_METHOD_LOCK</h3>
<pre class="programlisting">#define SOUP_METHOD_LOCK      _SOUP_INTERN_METHOD (LOCK)
</pre>
<p>"LOCK" as an interned string.</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-METHOD-UNLOCK:CAPS"></a><h3>SOUP_METHOD_UNLOCK</h3>
<pre class="programlisting">#define SOUP_METHOD_UNLOCK    _SOUP_INTERN_METHOD (UNLOCK)
</pre>
<p>"UNLOCK" as an interned string.</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28.1</div>
</body>
</html>