Hello,
The browser's security model doesn't allow for cross-domain AJAX requests. This is not a Dart issue, but a browser issue. There are two ways you can get around this.
or
Setup CORS headers. If you control the server you are talking to, you can emit Access-Control-Allow-Origin: * header for all requests. This is the standards compliant way to allow any remote origin to use AJAX (aka XMLHttpRequest) to connect to your server.
Do you control the server you are talking to?
Meanwhile, FTP relies on TCP, which the browser does not understand. It's possible to write a command line FTP client (or server) in Dart, as command-line Dart supports TCP.
Hope that helps,
Seth