soup-method

## soup-method soup-method — HTTP method definitions |

## Synopsis

    #define             SOUP_METHOD_OPTIONS
    #define             SOUP_METHOD_GET
    #define             SOUP_METHOD_HEAD
    #define             SOUP_METHOD_PUT
    #define             SOUP_METHOD_POST
    #define             SOUP_METHOD_DELETE
    #define             SOUP_METHOD_TRACE
    #define             SOUP_METHOD_CONNECT

    #define             SOUP_METHOD_PROPFIND
    #define             SOUP_METHOD_PROPPATCH
    #define             SOUP_METHOD_MKCOL
    #define             SOUP_METHOD_COPY
    #define             SOUP_METHOD_MOVE
    #define             SOUP_METHOD_LOCK
    #define             SOUP_METHOD_UNLOCK

## Description

soup-method.h contains a number of defines for standard HTTP and WebDAV headers. You do not need to use these defines; you can pass arbitrary strings to `soup_message_new()` if you prefer.

The thing that these defines are useful for is performing quick comparisons against SoupMessage's `method` field; because that field always contains an interned string, and these macros return interned strings, you can compare `method` directly against these macros rather than needing to use `strcmp()`. This is most useful in SoupServer handlers. Eg:

    	if (msg->method != SOUP_METHOD_GET && msg->method != SOUP_METHOD_HEAD) {
    		soup_message_set_status (msg, SOUP_METHOD_NOT_IMPLEMENTED);
    		return;
    	}

## Details

### SOUP_METHOD_OPTIONS

    #define SOUP_METHOD_OPTIONS   (_SOUP_METHOD_OPTIONS ? _SOUP_METHOD_OPTIONS : (_SOUP_METHOD_OPTIONS = g_intern_static_string ("OPTIONS")))

### SOUP_METHOD_GET

    #define SOUP_METHOD_GET       (_SOUP_METHOD_GET ? _SOUP_METHOD_GET : (_SOUP_METHOD_GET = g_intern_static_string ("GET")))

### SOUP_METHOD_HEAD

    #define SOUP_METHOD_HEAD      (_SOUP_METHOD_HEAD ? _SOUP_METHOD_HEAD : (_SOUP_METHOD_HEAD = g_intern_static_string ("HEAD")))

### SOUP_METHOD_PUT

    #define SOUP_METHOD_PUT       (_SOUP_METHOD_PUT ? _SOUP_METHOD_PUT : (_SOUP_METHOD_PUT = g_intern_static_string ("PUT")))

### SOUP_METHOD_POST

    #define SOUP_METHOD_POST      (_SOUP_METHOD_POST ? _SOUP_METHOD_POST : (_SOUP_METHOD_POST = g_intern_static_string ("POST")))

### SOUP_METHOD_DELETE

    #define SOUP_METHOD_DELETE    (_SOUP_METHOD_DELETE ? _SOUP_METHOD_DELETE : (_SOUP_METHOD_DELETE = g_intern_static_string ("DELETE")))

### SOUP_METHOD_TRACE

    #define SOUP_METHOD_TRACE     (_SOUP_METHOD_TRACE ? _SOUP_METHOD_TRACE : (_SOUP_METHOD_TRACE = g_intern_static_string ("TRACE")))

### SOUP_METHOD_CONNECT

    #define SOUP_METHOD_CONNECT   (_SOUP_METHOD_CONNECT ? _SOUP_METHOD_CONNECT : (_SOUP_METHOD_CONNECT = g_intern_static_string ("CONNECT")))

### SOUP_METHOD_PROPFIND

    #define SOUP_METHOD_PROPFIND  (_SOUP_METHOD_PROPFIND ? _SOUP_METHOD_PROPFIND : (_SOUP_METHOD_PROPFIND = g_intern_static_string ("PROPFIND")))

### SOUP_METHOD_PROPPATCH

    #define SOUP_METHOD_PROPPATCH (_SOUP_METHOD_PROPPATCH ? _SOUP_METHOD_PROPPATCH : (_SOUP_METHOD_PROPPATCH = g_intern_static_string ("PROPPATCH")))

### SOUP_METHOD_MKCOL

    #define SOUP_METHOD_MKCOL     (_SOUP_METHOD_MKCOL ? _SOUP_METHOD_MKCOL : (_SOUP_METHOD_MKCOL = g_intern_static_string ("MKCOL")))

### SOUP_METHOD_COPY

    #define SOUP_METHOD_COPY      (_SOUP_METHOD_COPY ? _SOUP_METHOD_COPY : (_SOUP_METHOD_COPY = g_intern_static_string ("COPY")))

### SOUP_METHOD_MOVE

    #define SOUP_METHOD_MOVE      (_SOUP_METHOD_MOVE ? _SOUP_METHOD_MOVE : (_SOUP_METHOD_MOVE = g_intern_static_string ("MOVE")))

### SOUP_METHOD_LOCK

    #define SOUP_METHOD_LOCK      (_SOUP_METHOD_LOCK ? _SOUP_METHOD_LOCK : (_SOUP_METHOD_LOCK = g_intern_static_string ("LOCK")))

### SOUP_METHOD_UNLOCK

    #define SOUP_METHOD_UNLOCK    (_SOUP_METHOD_UNLOCK ? _SOUP_METHOD_UNLOCK : (_SOUP_METHOD_UNLOCK = g_intern_static_string ("UNLOCK")))