[Corona] More Corona Questions

Randy Smith randy.smith at msic.dia.mil
Thu Apr 12 07:27:02 PDT 2012


Ryan,

I'm going to try and put this on the corona developer e-mail site with 
your e-mail. Could help others.

Thanks again for the response.
I'm understanding the situation better given your e-mail.

So, the verbs are necessary in Corona. I can see that. My issue is that 
I need something like curl to communicate with and manage things in 
corona when I'm in the .Net world. There may be some way to achieve the 
same results that curl provides but I'm not aware of it at this point.

It does seem I could use curl from the command line (i.e. curl -X POST 
-d "" 
"http://myserver:8080/manage/range/artist?element=artist&type=string" 
<http://myserver:8080/manage/range/artist?element=artist&type=string> ) 
to set up corona facets etc...  then do stringQueries via corona against 
the database and in the case of facets I believe corona calls like: 
http://myserver/facet/artist will send back values and counts since http 
defaults to GET?


Thoughts,
Randy

=========

Hi Randy,

No worries about the questions, it's fun to see people using Corona and 
learn about how my thoughts and design are interpreted by others. So 
keep them coming!

Warning: My answer here may sound kind of vague and I apologize if it's 
so vague that it isn't helpful. If that's the case, let me know and I 
can be a bit more concrete. My goal is to give a general answer around 
the philosophy of why the http verbs were chosen. So...

You can use any tool that you like to make the http requests. I'm very 
much a command line type of developer and curl is a common way that I 
issue http requests from the command line. But feel free to use any http 
client that you like.

To Corona, the http verb specified when accessing a resource/url is very 
important. As you probably know, browsers issue GET requests by default, 
telling the server to "get" the client the resource that was specified. 
Caching servers like Squid as well as web browsers and other http 
clients can use the http verbs to indicate what resources can be cached 
and what cannot be (for example, a GET request can be cached while a 
DELETE request cannot be).

So sadly, Corona can't support adding in something like GET 
/manage/range/foo?action=
DELETE. Let's say it did support this and your browser or a caching 
server sat between your client and the Corona server. Because it's a GET 
request, that caching server could respond to the request, never 
forwarding it on to Corona and leaving the client with the impression 
that the "foo" range index was actually deleted.

So, the result is that you have to use the http verbs as the Corona docs 
suggest.

Is that helpful?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/corona/attachments/20120412/ecbf7a3d/attachment.html 


More information about the Corona mailing list