diff --git a/lib/kiota_abstractions.dart b/lib/kiota_abstractions.dart index 7bde481..33b8a90 100644 --- a/lib/kiota_abstractions.dart +++ b/lib/kiota_abstractions.dart @@ -20,7 +20,7 @@ part 'src/extensions/request_information_extensions.dart'; part 'src/http_method.dart'; part 'src/multipart_body.dart'; part 'src/request_adapter.dart'; -part 'src/request_headers.dart'; +part 'src/http_headers.dart'; part 'src/request_information.dart'; part 'src/request_option.dart'; part 'src/response_handler.dart'; diff --git a/lib/src/extensions/request_information_extensions.dart b/lib/src/extensions/request_information_extensions.dart index acf6f84..57b1043 100644 --- a/lib/src/extensions/request_information_extensions.dart +++ b/lib/src/extensions/request_information_extensions.dart @@ -12,7 +12,7 @@ extension RequestInformationExtensions on RequestInformation { removeRequestOptions([option]); /// Vanity method to add headers to the request. - void addHeaders(RequestHeaders headers) { + void addHeaders(HttpHeaders headers) { headers.addAll(headers); } diff --git a/lib/src/request_headers.dart b/lib/src/http_headers.dart similarity index 94% rename from lib/src/request_headers.dart rename to lib/src/http_headers.dart index 82facef..69feb81 100644 --- a/lib/src/request_headers.dart +++ b/lib/src/http_headers.dart @@ -3,9 +3,9 @@ part of '../kiota_abstractions.dart'; /// Represents the headers of a request. /// /// Internally, this class uses a [Map] to store the headers. -class RequestHeaders implements Map { - /// Creates a new instance of [RequestHeaders]. - RequestHeaders(); +class HttpHeaders implements Map { + /// Creates a new instance of [HttpHeaders]. + HttpHeaders(); final Map _headers = {}; diff --git a/lib/src/request_information.dart b/lib/src/request_information.dart index 5b75192..75f82c6 100644 --- a/lib/src/request_information.dart +++ b/lib/src/request_information.dart @@ -34,10 +34,10 @@ class RequestInformation { /// The query parameters to use for the URL when generating the URI. Map queryParameters; - final RequestHeaders _headers = RequestHeaders(); + final HttpHeaders _headers = HttpHeaders(); /// The request headers. - RequestHeaders get headers => _headers; + HttpHeaders get headers => _headers; /// The request body. Uint8List content = Uint8List(0); diff --git a/test/request_information_test.dart b/test/request_information_test.dart index fd46074..d1fb714 100644 --- a/test/request_information_test.dart +++ b/test/request_information_test.dart @@ -18,7 +18,7 @@ void main() { expect(blank.urlTemplate, null); expect(blank.pathParameters, {}); expect(blank.queryParameters, {}); - expect(blank.headers, RequestHeaders()); + expect(blank.headers, HttpHeaders()); expect( blank.content, isA().having((content) => content.length, 'length', equals(0)),