Function esi_fastly::process_esi[][src]

pub fn process_esi(req: Request, response: Response) -> Result<Response, Error>

Processes the body of a fastly::Response and returns an updated Response after executing all found ESI instructions.

Examples

use fastly::{Error, Request, Response};
use esi_fastly::process_esi;

#[fastly::main]
fn main(req: Request) -> Result<Response, Error> {
    let beresp = req.send("backend")?;
    process_esi(req, beresp);
}