I am looking for an example code to make an http request in D, something how the XMLHttpRequest of jscript.
Some people have created wrappers for libcurl, which you can use to make http requests.
Try this one. https://github.com/gmfawcett/d-play-libcurl/blob/master/fawcett/curl.d