This is a general issue when you want to check traffic on localhost. There is a workaround described in the Charles Proxy FAQ:
Some systems are hard coded to not use proxies for localhost traffic. Specifically IE 7 and .Net applications have this feature.
The workaround is to connect to
http://localhost./test/
instead (note the . after localhost). This should work identically to localhost normally but with the advantage that it will go through Charles.Alternatively you can replace localhost with the name of your machine, or your local link IP address (eg. 192.168.1.2). So rather than connecting to
http://localhost/test/
you connect tohttp://machinename/test/