Skip to content

REQ_PUT

Jurek Muszyński edited this page Mar 28, 2024 · 2 revisions

bool REQ_PUT

Description

Answers whether request method is PUT.

Returns

Returns true if request method is PUT, otherwise false.

Example

if ( URI("api/v1/customer") )
{
    if ( REQ_GET )
        customer_get();
    else if ( REQ_POST )
        customer_add();
    else if ( REQ_PUT )
        customer_update();
    else if ( REQ_DELETE )
        customer_delete();
    else  /* method not allowed */
        RES_STATUS(405);
}
Clone this wiki locally