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

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.9       frystyk     3: <TITLE>W3C Reference Library libwww HTTP METHODS</TITLE>
2.10    ! frystyk     4: <!-- Changed by: Henrik Frystyk Nielsen, 23-Mar-1996 -->
2.1       frystyk     5: <NEXTID N="z11">
                      6: </HEAD>
                      7: <BODY>
                      8: 
                      9: <H1>Method Management</H1>
                     10: 
                     11: <PRE>
                     12: /*
                     13: **     (c) COPYRIGHT MIT 1995.
                     14: **     Please first read the full copyright statement in the file COPYRIGH.
                     15: */
                     16: </PRE>
                     17: 
                     18: This module keeps a list of valid methods to be used on a request
2.4       frystyk    19: obejct. It used to be in <A HREF="HTReq.html">HTAccess module</A>
2.1       frystyk    20: but for future extensions, it is now in its own module. <P>
                     21: 
2.5       frystyk    22: This module is implemented by <A HREF="HTMethod.c">HTmethod.c</A>, and
                     23: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
                     24: Reference Library</A>. <P>
2.1       frystyk    25: 
                     26: <PRE>
                     27: #ifndef HTMETHOD_H
                     28: #define HTMETHOD_H
                     29: 
                     30: </PRE>
                     31: 
                     32: These are the valid methods, see <A
2.3       frystyk    33: HREF="http://www.w3.org/pub/WWW/Protocols/HTTP/Methods.html">HTTP
2.1       frystyk    34: Methods</A>. <P>
                     35: 
                     36: <B>NOTE:</B> the anchor list of allowed methods is now a bitflag, not
                     37: at list.
                     38: 
                     39: <PRE>
                     40: typedef enum {
                     41:     METHOD_INVALID     = 0x0,
                     42:     METHOD_GET         = 0x1,
                     43:     METHOD_HEAD                = 0x2,    
                     44:     METHOD_POST                = 0x4,    
                     45:     METHOD_PUT         = 0x8,    
                     46:     METHOD_DELETE      = 0x10,
                     47:     METHOD_LINK                = 0x20,
                     48:     METHOD_UNLINK      = 0x40
                     49: } HTMethod;
                     50: </PRE>
                     51: 
                     52: <H3>Get Method Enumeration</H3>
                     53: 
                     54: Gives the enumeration value of the method as a function of the (char *) name.
                     55: 
                     56: <PRE>
2.8       frystyk    57: extern HTMethod HTMethod_enum (const char * name);
2.1       frystyk    58: </PRE>
                     59: 
                     60: <H3>Get Method String</H3>
                     61: 
                     62: The reverse of <I>HTMethod_enum()</I>
                     63: 
                     64: <PRE>
2.8       frystyk    65: extern const char * HTMethod_name (HTMethod method);
2.7       frystyk    66: </PRE>
                     67: 
                     68: <H3>Is Method "Safe"</H3>
                     69: 
                     70: If a method a safe, it doesn't produce any side effects on the server
                     71: 
                     72: <PRE>
                     73: #define HTMethod_isSafe(me)    ((me) &amp; (METHOD_GET|METHOD_HEAD))
                     74: </PRE>
                     75: 
                     76: <H3>Does a Method include Entity</H3>
                     77: 
                     78: Does a method include an entity to be sent from the client to the server?
                     79: 
                     80: <PRE>
                     81: #define HTMethod_hasEntity(me) ((me) &amp; (METHOD_PUT | METHOD_POST))
2.1       frystyk    82: </PRE>
                     83: 
                     84: <PRE>
                     85: #endif /* HTMETHOD_H */
                     86: </PRE>
                     87: 
2.10    ! frystyk    88: <HR>
        !            89: <ADDRESS>
        !            90: @(#) $Id: Date Author State $
        !            91: </ADDRESS>
2.1       frystyk    92: </BODY>
                     93: </HTML>

Webmaster