Playwright::Route::FulfillResponse
Inherits JSON::Serializable / Reference / Object
Constructors
new(pull : JSON::PullParser)
Sourcenew(status : Int32 | Nil = nil, headers : Nil | Hash(String, String) = nil, content_type : Nil | String = nil, body : String = nil, path : Path | Nil = nil)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
body
Sourcebody_bytes
SourceIf set, equals to setting Content-Type response header.
Optional response headers. Header values will be converted to a string.
path
Optional file path to respond with. The content type will be inferred from file extension. If path is a relative path, then it is resolved relative to the current working directory.
Optional file path to respond with. The content type will be inferred from file extension. If path is a relative path, then it is resolved relative to the current working directory.