We will use REST operations with workspaces. In this section, as in the others contained in this chapter, we will use both cURL and Python to perform the same operation.
The examples are shown in a Linux shell, but cURL and Python syntaxes are identical in a Windows shell.
- We want to retrieve which workspaces are defined in your GeoServer instance. This requires a GET operation. The following piece of code shows you the syntax. cURL has a lot of options; you can take a look at all of them, by running it with the curl --help command from Linux and Windows. On Linux, you can also take a look at the manual with the man curl command. Let's look at the different options we use:
- The first option we use is -u. It stands for ...