Annotation of libwww/Library/src/HTMethod.html, revision 2.12

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.11      frystyk     3:   <TITLE>W3C Reference Library libwww Request Access Methods</TITLE>
2.1       frystyk     4: </HEAD>
                      5: <BODY>
2.11      frystyk     6: <H1>
                      7:   Request Access Methods
                      8: </H1>
2.1       frystyk     9: <PRE>
                     10: /*
                     11: **     (c) COPYRIGHT MIT 1995.
                     12: **     Please first read the full copyright statement in the file COPYRIGH.
                     13: */
                     14: </PRE>
2.11      frystyk    15: <P>
                     16: This module keeps a list of valid methods to be performed on a
                     17: <A HREF="HTReq.html">request object</A>, for example <B>GET</B>, <B>HEAD</B>,
                     18: <B>PUT</B>, <B>POST</B>, <B>DELETE</B>, etc.&nbsp;You can assign which method
                     19: to be performed on the request object <A HREF="HTReq.html">directly</A> or
                     20: you can go through the <A HREF="HTReq.html">Access module</A> for higher
                     21: level functions.
                     22: <P>
2.12    ! frystyk    23: This module is implemented by <A HREF="HTMethod.c">HTMethod.c</A>, and it
2.11      frystyk    24: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Reference
                     25: Library</A>.
                     26: <PRE>#ifndef HTMETHOD_H
2.1       frystyk    27: #define HTMETHOD_H
                     28: 
                     29: </PRE>
2.11      frystyk    30: <P>
2.12    ! frystyk    31: <B>NOTE:</B> The anchor list of allowed methods is a bitflag, not at list!
2.1       frystyk    32: <PRE>
                     33: typedef enum {
                     34:     METHOD_INVALID     = 0x0,
                     35:     METHOD_GET         = 0x1,
                     36:     METHOD_HEAD                = 0x2,    
                     37:     METHOD_POST                = 0x4,    
                     38:     METHOD_PUT         = 0x8,    
                     39:     METHOD_DELETE      = 0x10,
                     40:     METHOD_LINK                = 0x20,
                     41:     METHOD_UNLINK      = 0x40
                     42: } HTMethod;
                     43: </PRE>
2.11      frystyk    44: <H3>
                     45:   Get Method Enumeration
                     46: </H3>
                     47: <P>
2.1       frystyk    48: Gives the enumeration value of the method as a function of the (char *) name.
                     49: <PRE>
2.8       frystyk    50: extern HTMethod HTMethod_enum (const char * name);
2.1       frystyk    51: </PRE>
2.11      frystyk    52: <H3>
                     53:   Get Method String
                     54: </H3>
                     55: <P>
2.1       frystyk    56: The reverse of <I>HTMethod_enum()</I>
                     57: <PRE>
2.8       frystyk    58: extern const char * HTMethod_name (HTMethod method);
2.7       frystyk    59: </PRE>
2.11      frystyk    60: <H3>
2.12    ! frystyk    61:   Is Method "Safe"?
2.11      frystyk    62: </H3>
                     63: <P>
2.7       frystyk    64: If a method a safe, it doesn't produce any side effects on the server
                     65: <PRE>
                     66: #define HTMethod_isSafe(me)    ((me) &amp; (METHOD_GET|METHOD_HEAD))
                     67: </PRE>
2.11      frystyk    68: <H3>
2.12    ! frystyk    69:   Does a Method include Entity?
2.11      frystyk    70: </H3>
                     71: <P>
2.7       frystyk    72: Does a method include an entity to be sent from the client to the server?
                     73: <PRE>
                     74: #define HTMethod_hasEntity(me) ((me) &amp; (METHOD_PUT | METHOD_POST))
2.1       frystyk    75: </PRE>
                     76: <PRE>
                     77: #endif /* HTMETHOD_H */
                     78: </PRE>
2.11      frystyk    79: <P>
                     80:   <HR>
2.10      frystyk    81: <ADDRESS>
2.12    ! frystyk    82:   @(#) $Id: HTMethod.html,v 2.11 1996/06/01 17:46:50 frystyk Exp $
2.10      frystyk    83: </ADDRESS>
2.11      frystyk    84: </BODY></HTML>

Webmaster