Minor changes to better prepare for Null Safety (#10) * Implement chunkedTransferEncoding getter This avoids returning `null` which will be problematic in the future since `HttpHeaders` interface defines the return value as non-nullable. * Return -1 if content length is not specified According to the documentation in `HttpHeaders`: "The value is negative if there is no content length set." This will make the null-safety migration easier since `HttpHeaders` define the return value as non-nullable.
A simple Dart HTTP client implemented using RawSynchronousSockets to allow for synchronous HTTP requests.
Warning: This library should probably only be used to connect to HTTP servers that are hosted on ‘localhost’. The operations in this library will block the calling thread to wait for a response from the HTTP server. The thread can process no other events while waiting for the server to respond. As such, this synchronous HTTP client library is not suitable for applications that require high performance. Instead, such applications should use libraries built on asynchronous I/O, including dart:io and package:http, for the best performance.