Skip to content
LogoLogo

Challenge.fromHeaders

Extract a Challenge from Headers

Extracts the Challenge from a Headers object.

Usage

import {  } from 'mppx'
 
const  = await ('/resource')
const  = .(.)

With method type narrowing

Use a method definition to get type-safe access to method-specific request fields.

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

Return type

type ReturnType = Challenge

The deserialized Challenge object.

Parameters

headers

  • Type: Headers

The HTTP headers object.

options (optional)

  • Type: { methods?: readonly Method.Method[] }

Optional settings to narrow the Challenge type using method intents.