prepend_http 1.0.0 copy "prepend_http: ^1.0.0" to clipboard
prepend_http: ^1.0.0 copied to clipboard

Prepend `https://` to humanized URLs.

Prepend https:// to humanized URLs like sindresorhus.com and localhost

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

0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

Prepend `https://` to humanized URLs.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

More

Packages that depend on prepend_http