ravendb
Version:
RavenDB client for Node.js
82 lines • 1.7 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetRequest = void 0;
class GetRequest {
_url;
_headers;
_query;
_method;
_canCacheAggressively = true;
/**
* Concatenated Url and Query.
*/
get urlAndQuery() {
if (!this._query) {
return this._url;
}
if (this._query[0] === "?") {
return this._url + this._query;
}
return this._url + "?" + this._query;
}
_content;
constructor() {
this._headers = {};
}
/**
* Request url (relative).
*/
get url() {
return this._url;
}
/**
* Request url (relative).
*/
set url(url) {
this._url = url;
}
/**
* Request headers.
*/
get headers() {
return this._headers;
}
/**
* Request headers.
*/
set headers(headers) {
this._headers = headers;
}
/**
* Query information e.g. "?pageStart=10&pageSize=20".
*/
get query() {
return this._query;
}
/**
* Query information e.g. "?pageStart=10&pageSize=20".
*/
set query(query) {
this._query = query;
}
get method() {
return this._method;
}
set method(method) {
this._method = method;
}
get body() {
return this._content;
}
set body(content) {
this._content = content;
}
get canCacheAggressively() {
return this._canCacheAggressively;
}
set canCacheAggressively(value) {
this._canCacheAggressively = value;
}
}
exports.GetRequest = GetRequest;
//# sourceMappingURL=GetRequest.js.map