Annotation of libwww/Library/src/HTMethod.html, revision 2.11
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. 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>
! 23: This module is implemented by <A HREF="HTMethod.c">HTmethod.c</A>, and it
! 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>
! 31: <B>NOTE:</B> the anchor list of allowed methods is now a bitflag, not at
! 32: list.
2.1 frystyk 33: <PRE>
34: typedef enum {
35: METHOD_INVALID = 0x0,
36: METHOD_GET = 0x1,
37: METHOD_HEAD = 0x2,
38: METHOD_POST = 0x4,
39: METHOD_PUT = 0x8,
40: METHOD_DELETE = 0x10,
41: METHOD_LINK = 0x20,
42: METHOD_UNLINK = 0x40
43: } HTMethod;
44: </PRE>
2.11 ! frystyk 45: <H3>
! 46: Get Method Enumeration
! 47: </H3>
! 48: <P>
2.1 frystyk 49: Gives the enumeration value of the method as a function of the (char *) name.
50: <PRE>
2.8 frystyk 51: extern HTMethod HTMethod_enum (const char * name);
2.1 frystyk 52: </PRE>
2.11 ! frystyk 53: <H3>
! 54: Get Method String
! 55: </H3>
! 56: <P>
2.1 frystyk 57: The reverse of <I>HTMethod_enum()</I>
58: <PRE>
2.8 frystyk 59: extern const char * HTMethod_name (HTMethod method);
2.7 frystyk 60: </PRE>
2.11 ! frystyk 61: <H3>
! 62: Is Method "Safe"
! 63: </H3>
! 64: <P>
2.7 frystyk 65: If a method a safe, it doesn't produce any side effects on the server
66: <PRE>
67: #define HTMethod_isSafe(me) ((me) & (METHOD_GET|METHOD_HEAD))
68: </PRE>
2.11 ! frystyk 69: <H3>
! 70: Does a Method include Entity
! 71: </H3>
! 72: <P>
2.7 frystyk 73: Does a method include an entity to be sent from the client to the server?
74: <PRE>
75: #define HTMethod_hasEntity(me) ((me) & (METHOD_PUT | METHOD_POST))
2.1 frystyk 76: </PRE>
77: <PRE>
78: #endif /* HTMETHOD_H */
79: </PRE>
2.11 ! frystyk 80: <P>
! 81: <HR>
2.10 frystyk 82: <ADDRESS>
2.11 ! frystyk 83: @(#) $Id: HTMethod.html,v 2.10 1996/04/12 17:47:57 frystyk Exp $
2.10 frystyk 84: </ADDRESS>
2.11 ! frystyk 85: </BODY></HTML>
Webmaster