Hibernating Rhinos Ltd
Grisha Kotler l RavenDB Core Team Developer l Mobile: +972-54-586-8647
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple" http://ravendb.net/
I'm trying to write some code for a pull request, and it requires that I get a single document using the HTTP commands and the `commandBase` layout. I've never used Raven with the HTTP commands, so I'm having some trouble with this. I've gotten it to work using the already existing multi_get from getCollectionCountCommand, but I feel it's better to get a single document. This is what I have so far...--
var requests = this.collections.map(collection => {return {Url: "/queries/",Headers: {},Query: "?id=" + queryUtil.escapeTerm("document id goes here")}});this.post("/multi_get?parallel=yes", JSON.stringify(requests), this.ownerDb, null, 0).done((result) => {task.resolve(this.collections);}).fail((response: JQueryXHR) => {this.reportError("Failed to fetch collections count", response.responseText, response.statusText);task.reject(response);});My problem is that I'm a little confused about how the post function works here, and what it's expecting to do a `GET`. As I understand it from http://ravendb.net/docs/article-page/3.0/http/client-api/commands/documents/get#get, the URL I'm inevitably wanting to send would look like..http://{server}/databases/{database}/queries/id={document id}I tried removing the multi_get?parallel=yes and the url came out without any of the parameters. Is there an example of using this code for a single document request?
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.