public function filter_rest_post_dispatch( WP_HTTP_Response $result, WP_REST_Server $server, WP_REST_Request $request ) {

		if ( ! $this->should_dispatch() ) {
			return $result;
		}

		$this->before_output();

		/* @var QM_Output_Headers[] */
		foreach ( $this->get_outputters( 'headers' ) as $id => $output ) {
			$output->output();
		}

		$this->after_output();

		return $result;

	}
public function filter_rest_post_dispatch( WP_HTTP_Response $result, WP_REST_Server $server, WP_REST_Request $request ) {

		if ( ! $this->should_dispatch() ) {
			return $result;
		}

		$this->before_output();

		/* @var QM_Output_Headers[] */
		foreach ( $this->get_outputters( 'headers' ) as $id => $output ) {
			$output->output();
		}

		$this->after_output();

		return $result;

	}
public function filter_rest_post_dispatch ( WP_HTTP_Response $ result , WP_REST_Server $ server , WP_REST_Request $ request ) { if ( ! $ this -> should_dispatch ( ) ) { return $ result ; } $ this -> before_output ( ) ; /* @var QM_Output_Headers[] */ foreach ( $ this -> get_outputters ( 'headers' ) as $ id => $ output ) { $ output -> output ( ) ; } $ this -> after_output ( ) ; return $ result ; }
Filters a REST API response in order to add QM's headers.

@param WP_HTTP_Response $result  Result to send to the client. Usually a WP_REST_Response.
@param WP_REST_Server   $server  Server instance.
@param WP_REST_Request  $request Request used to generate the response.
@return WP_HTTP_Response Result to send to the client.
Filters a REST API response in order to add QM s headers .