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

## Synopsis

    #include <libsoup/soup.h>

    #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:

    1
    2
    3
    4
    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_INTERN_METHOD (OPTIONS)

"OPTIONS" as an interned string.

### SOUP_METHOD_GET

    #define SOUP_METHOD_GET       _SOUP_INTERN_METHOD (GET)

"GET" as an interned string.

### SOUP_METHOD_HEAD

    #define SOUP_METHOD_HEAD      _SOUP_INTERN_METHOD (HEAD)

"HEAD" as an interned string.

### SOUP_METHOD_PUT

    #define SOUP_METHOD_PUT       _SOUP_INTERN_METHOD (PUT)

"PUT" as an interned string.

### SOUP_METHOD_POST

    #define SOUP_METHOD_POST      _SOUP_INTERN_METHOD (POST)

"POST" as an interned string.

### SOUP_METHOD_DELETE

    #define SOUP_METHOD_DELETE    _SOUP_INTERN_METHOD (DELETE)

"DELETE" as an interned string.

### SOUP_METHOD_TRACE

    #define SOUP_METHOD_TRACE     _SOUP_INTERN_METHOD (TRACE)

"TRACE" as an interned string.

### SOUP_METHOD_CONNECT

    #define SOUP_METHOD_CONNECT   _SOUP_INTERN_METHOD (CONNECT)

"CONNECT" as an interned string.

### SOUP_METHOD_PROPFIND

    #define SOUP_METHOD_PROPFIND  _SOUP_INTERN_METHOD (PROPFIND)

"PROPFIND" as an interned string.

### SOUP_METHOD_PROPPATCH

    #define SOUP_METHOD_PROPPATCH _SOUP_INTERN_METHOD (PROPPATCH)

"PROPPATCH" as an interned string.

### SOUP_METHOD_MKCOL

    #define SOUP_METHOD_MKCOL     _SOUP_INTERN_METHOD (MKCOL)

"MKCOL" as an interned string.

### SOUP_METHOD_COPY

    #define SOUP_METHOD_COPY      _SOUP_INTERN_METHOD (COPY)

"COPY" as an interned string.

### SOUP_METHOD_MOVE

    #define SOUP_METHOD_MOVE      _SOUP_INTERN_METHOD (MOVE)

"MOVE" as an interned string.

### SOUP_METHOD_LOCK

    #define SOUP_METHOD_LOCK      _SOUP_INTERN_METHOD (LOCK)

"LOCK" as an interned string.

### SOUP_METHOD_UNLOCK

    #define SOUP_METHOD_UNLOCK    _SOUP_INTERN_METHOD (UNLOCK)

"UNLOCK" as an interned string.