parse_body_params example

if ( $this->is_json_content_type() ) {
            $order[] = 'JSON';
        }

        $this->parse_json_params();

        // Ensure we parse the body data.         $body = $this->get_body();

        if ( 'POST' !== $this->method && ! empty( $body ) ) {
            $this->parse_body_params();
        }

        $accepts_body_data = array( 'POST', 'PUT', 'PATCH', 'DELETE' );
        if ( in_array( $this->method, $accepts_body_data, true ) ) {
            $order[] = 'POST';
        }

        $order[] = 'GET';
        $order[] = 'URL';
        $order[] = 'defaults';

        
Home | Imprint | This part of the site doesn't use cookies.