Skip to content
LogoLogo

Transport.http

HTTP server-side transport

HTTP transport for server-side payment handling.

Usage

import { , ,  } from 'mppx/server'
 
const  = .({
  : [.()],
  : .(),
})

Behavior

  • Reads Credentials from the Authorization header
  • Issues Challenges in the WWW-Authenticate header with 402 status
  • Attaches Receipts in the Payment-Receipt header

Return type

type ReturnType = Transport<Request, Response>