Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i want to start use Geoserver REST api, but have no idea how to use it.
In Geoserver docs i found some examples but then use cURL. Google says what cURL its console comand utilite. So i dont understand how to use it. For example if i want to make user autification using ExtJs or another javascript framework how can i use cURL. Or i gonna do somthing else?

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

You don't have to use cURL. You can use anything that can interact with the HTTP protocol. This includes your web browser, Linux shell (or PowerShell in Windows), PHP, Java etc. If you want to use Python you will probably want to download the Requests library so make things easier because, while the standard library can handle REST requests, it is a pain. Since you don't have to use cURL, you therefore don't need to worry about trying to call cURL from Java (or anything else) as per your question. Just follow the examples in your link but couch the requests in the syntax appropriate to your chosen language/utility.

Having a command-line interface is handy for quick commands, but being able to write scripts is good if you want to manage a suite of servers and need to automate the work, but really your choice will be down to what you are familiar with (so for me that would be Python rather than cURL or Java but somebody else might prefer PHP for instance - it doesn't matter).

share|improve this answer
    
So i undeerstand you right REST work on server side? And for my example with user autification i gonna send data from client(javascript) to server(Java) and on Java using REST api generate HTTP request to Geoserver? –  Kliver Max May 16 '13 at 7:39
    
Yes. You send your REST request from anywhere to the server, allowing you to remotely manage Geoserver without access to the Admin interface. –  MappaGnosis May 16 '13 at 7:42
    
Okey. In geoserver docs i cant find how to start work REST in Java. I gonna download some libraries? Can you say what i gonna download or give link to manual? –  Kliver Max May 16 '13 at 7:49
    
The choice is up to you. I am not so familiar with Java as python but have a look at this thread: stackoverflow.com/questions/221442/rest-clients-for-java –  MappaGnosis May 16 '13 at 8:41
    
Thank you. Will try to chouse something. –  Kliver Max May 16 '13 at 8:59
add comment

If you want to call GeoServer REST API from Java have a look at GeoServer Manager: https://code.google.com/p/geoserver-manager/

share|improve this answer
    
Yeah nice library. But its only exist in java classes format, not *.jar? –  Kliver Max May 16 '13 at 10:10
    
It's deployed to Maven, so it exists also as jars. –  Andrea Aime May 17 '13 at 15:40
add comment

You can use Rest Client Interfaces that are available for Chrome and Firefox. I am using "Simple Rest Client" Chrome extension (https://chrome.google.com/webstore/search/simple%20rest%20client?utm_source=chrome-ntp-icon); and happy with it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.