Skip to main content
Module

x/tepi/http/interpolate.http

A .http Test Runner
Go to Latest
File
---host: <%= Deno.env.get('HOST') || 'https://faker.deno.dev' %>---###---data: Garnid: hasData---POST /pong?quiet=truex-data: <%= meta.data %>
Hola <%= meta.data %>!
HTTP/1.1 200 OKcontent-type: <%= request.headers.get("content-type") %>
Hola Garn!<% false && console.log('hola mundo') %>###GET /pong?quiet=trueread-from-id: <%= hasData.meta.data %>
###---id: must fail---GET /pongquiet: true
<% assert(false, 'ups') %>
###---id: must work---POST /pong?quiet=true
hola
HTTP/1.1 200 OK
<%= 'hola' %><% assert(true, 'ups') %>
###---id: must read another request---POST /pongquiet: truex-payload: <%= hasData.request.headers.get('x-data') + '?' %>
<%= hasData.request.headers.get('x-data') + '!' %>HTTP/1.1 200 OKx-payload: Garn?
Garn!

###---id: must read same request---POST /pongquiet: true
body
HTTP/1.1 200 OK
<%= await request.getBody() %>
###---id: must read same response---POST /pongquiet: trueadios: mundo
body ¿?
HTTP/1.1 <%= response.status %> <%= response.statusText %>hola: mundo<% response.headers.forEach((v, k) => { %> <%= k %>: <%= v +'\n'%> <% }) %><%= await response.getBody() + '!' %>

###---id: must interpolate ts---POST /pong?quiet=truex-quiet: true
<% const a = 1; %><%= a %>