class StatusCodeProbe

Overview

Fills in details.status_code for every endpoint (--status-codes) and drops the ones whose code the user excluded (--exclude-codes).

Deliberately not a Deliver subclass, even though it is the other thing in noir that fires HTTP requests at discovered endpoints. A status probe runs before delivery, ignores --probe-match / --probe-skip, and sends none of the --probe-header values — it exists to answer "does this route respond, and with what", not to replay traffic. Inheriting the sender base would quietly give it all three.

Included Modules

Defined in:

deliver/status_code.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(options : Hash(String, YAML::Any), logger : NoirLogger) #

[View source]

Instance Method Detail

def apply(endpoints : Array(Endpoint)) : Array(Endpoint) #

[View source]
def perform_request(method, url, params = {} of String => String, form = {} of String => String, json = false) #

The single point where a request leaves the process, so specs can drive #apply against canned responses by overriding this one method.


[View source]