1<refentry id="refreqflags"> 2 3 <refmeta> 4 <refentrytitle>ne_set_request_flag</refentrytitle> 5 <manvolnum>3</manvolnum> 6 </refmeta> 7 8 <refnamediv> 9 <refname id="ne_set_request_flag">ne_set_request_flag</refname> 10 <refname id="ne_get_request_flag">ne_get_request_flag</refname> 11 <refpurpose>set and retrieve per-request flags</refpurpose> 12 </refnamediv> 13 14 <refsynopsisdiv> 15 16 <funcsynopsis> 17 18 <funcsynopsisinfo>#include <ne_request.h></funcsynopsisinfo> 19 20 <funcprototype> 21 <funcdef>void <function>ne_set_request_flag</function></funcdef> 22 <paramdef>ne_request *<parameter>req</parameter></paramdef> 23 <paramdef>ne_request_flag <parameter>flag</parameter></paramdef> 24 <paramdef>int <parameter>value</parameter></paramdef> 25 </funcprototype> 26 27 <funcprototype> 28 <funcdef>int <function>ne_get_request_flag</function></funcdef> 29 <paramdef>ne_request *<parameter>req</parameter></paramdef> 30 <paramdef>ne_request_flag <parameter>flag</parameter></paramdef> 31 </funcprototype> 32 33 </funcsynopsis> 34 35 </refsynopsisdiv> 36 37 <refsect1> 38 <title>Description</title> 39 40 <para>The <function>ne_set_request_flag</function> function 41 enables or disables a per-request flag. Passing a non-zero 42 <parameter>value</parameter> argument enables the flag, and zero 43 disables it.</para> 44 45 <para>The following flags are defined:</para> 46 47 <variablelist> 48 <varlistentry> 49 <term><constant>NE_REQFLAG_EXPECT100</constant></term> 50 <listitem> 51 <simpara>enable this flag to use the "Expect: 52 100-continue" feature of HTTP/1.1, which allows the 53 server to process request headers without reading the 54 entire request body. This saves time and bandwidth if 55 the server gives an authentication challenge (requiring 56 the request to be resent), but has interoperability 57 problems with some older servers.</simpara> 58 </listitem> 59 </varlistentry> 60 <varlistentry> 61 <term><constant>NE_REQFLAG_IDEMPOTENT</constant></term> 62 <listitem> 63 <simpara>disable this flag if the request uses a 64 non-idempotent method such as 65 <literal>POST</literal></simpara> 66 </listitem> 67 </varlistentry> 68 </variablelist> 69 </refsect1> 70 71 <refsect1> 72 <title>Return value</title> 73 74 <para>The <function>ne_get_request_flag</function> function returns 75 zero if a flag is disabled, less than zero if the flag is not 76 supported, or greater than zero if the flag is enabled.</para> 77 </refsect1> 78 79 <refsect1> 80 <title>See also</title> 81 82 <para><xref linkend="ne_request_create"/>.</para> 83 84 </refsect1> 85 86</refentry> 87