<reponame>ludicast/tower

Tower.HTTP.Request = (function() {

  function Request(data) {
    if (data == null) data = {};
    this.url = data.url;
    this.location = data.location;
    this.pathname = this.location.path;
    this.query = this.location.query;
    this.title = data.title;
    this.title || (this.title = typeof document !== "undefined" && document !== null ? document.title : void 0);
    this.body = data.body || {};
    this.headers = data.headers || {};
    this.method = data.method || "GET";
  }

  return Request;

})();

module.exports = Tower.HTTP.Request;
