src/Ajaxer.php
public function request_type( $type = null ) {
		if ( ! is_null( $type ) ) {
			if ( is_array( $type ) ) {
				return in_array( $_SERVER['REQUEST_METHOD'], array_map( 'strtoupper', $type ) );
			}
			return ( strtoupper( $type ) === $_SERVER['REQUEST_METHOD'] );
		}
		return $_SERVER['REQUEST_METHOD'];
	}
public function request_type( $type = null ) {
		if ( ! is_null( $type ) ) {
			if ( is_array( $type ) ) {
				return in_array( $_SERVER['REQUEST_METHOD'], array_map( 'strtoupper', $type ) );
			}
			return ( strtoupper( $type ) === $_SERVER['REQUEST_METHOD'] );
		}
		return $_SERVER['REQUEST_METHOD'];
	}
Checks / Returns the type of request method for the current request.

@param string|array $type The type of request you want to check. If an array
this method will return true if the request matches any type.

@return string