1
0

reqflags.xml 2.6 KB

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