Prepend
https://
to humanized URLs likesindresorhus.com
andlocalhost
Install
$ npm install prepend_http
Usage
import 'package:prepend_http/prepend_http.dart';
main() {
prependHttp('localhost', https: false);
//=> 'http://localhost'
prependHttp('sindresorhus.com');
//=> 'https://sindresorhus.com'
prependHttp('https://sindresorhus.com');
//=> 'https://sindresorhus.com'
}
API
prependHttp(url, options
)
url
Type: String
URL to prepend https://
to.
https
Type: boolean
Default: true
Prepend https://
instead of http://
.
License
MIT © Sindre Sorhus
Libraries
- prepend_http
- Support for doing something awesome. [...]