DoHResponse class

DNS over HTTPS Response

Represents a complete response from DoH server, including query status, questions and answer records. Complies with RFC 8484 and related DNS standards.

Constructors

DoHResponse({required int status, required bool tc, required bool rd, required bool ra, required bool ad, required bool cd, required DoHQuestion question, required List<DoHAnswer> answers, List<DoHAnswer> authority = const [], List<DoHAnswer> additional = const []})
Create DoH response instance
const
DoHResponse.fromJson(Map<String, dynamic> json)
Create DoH response from JSON
factory

Properties

Authenticated data flag (AD) - whether answer is DNSSEC validated
final
additional List<DoHAnswer>
Additional record list (optional)
final
allRecords List<DoHAnswer>
Get all records (answers + authority + additional)
no setter
answers List<DoHAnswer>
DNS answer record list
final
authority List<DoHAnswer>
Authority record list (optional)
final
cd bool
Checking disabled flag (CD) - whether DNSSEC checking is disabled
final
hasAnswers bool
Check if there are any answer records
no setter
hashCode int
The hash code for this object.
no setteroverride
isSecure bool
Check if DNSSEC validated
no setter
isSuccessful bool
Check if response is successful
no setter
question DoHQuestion
Original query question
final
ra bool
Recursion available flag (RA) - whether server supports recursive queries
final
rd bool
Recursion desired flag (RD) - whether client requested recursive query
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status int
DNS response status code (RCODE) 0 = NOERROR, 1 = FORMERR, 2 = SERVFAIL, 3 = NXDOMAIN, etc.
final
statusDescription String
Get response status description
no setter
tc bool
Truncation flag (TC) - whether response was truncated due to size
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override