Sudar Sudar - 4 years ago 201
Dart Question

urlencoding in Dart

Is there a function to do urlencoding in Dart? I am doing a AJAX call using XMLHttpRequest object and I need the url to be url encoded.

I did a search on, but it didn't turn up any results.

Answer Source

Update: There is now support for encode/decode URI in the Dart Uri class

Dart's URI code is placed in a separate library called dart:uri (so it can be shared between dart:html and dart:io). I looks like it currently does not include a urlencode function so your best alternative for now is probably to use this Dart implementation of JavaScript's encodeUriComponent.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download