his section will discuss the GeoWebCache REST API(转载)

本文档详细介绍了GeoWebCache REST API的功能,包括通过REST API管理图层、进行种子填充与截断操作、查询运行任务状态及终止任务等。此外还提供了关于磁盘配额REST API和批量截断功能的信息,并解释了如何指定资源表示格式。

REST API

This section will discuss the GeoWebCache REST API.

Formats and representations

A format specifies how a resource should be represented. A format is used:

  • In an operation to specify what representation should be returned to the client
  • In a POST or PUT operation to specify the representation being sent to the server

In a GET operation the format can be specified in a number of ways. The first is with the Accepts header. For instance setting the header to “text/xml” would specify the desire to have the resource returned as XML. The second method of specifying the format is via file extension. For example consider the resource “foo”. To request a representation of foo as XML the request uri would end with “foo.xml”. To request as JSON the request uri would end with “foo.json”. When no format is specified the server will use its own internal format, usually html.

In a POST or PUT operation the format specifies 1) the representatin of the content being sent to the server, and 2) the representation of the resposne to be sent back. The former is specified with the Content-type header. To send a representation in XML, the content type “text/xml” or “application/xml” would be used. The latter is specified with the Accepts header as specified in the above paragraph describing a GET operation.

The following table defines the Content-type values for each format:

FormatContent-type
XMLtext/xml
JSONapplication/json
HTMLapplication/html

Authentication

POST, PUT, and DELETE requests (requests that modify resources) require the client to be authenticated. Currently the only supported method of authentication is Basic authentication.

Status codes

A Http request uses a status code to relay the outcome of the request to the client. Different status codes are used for various purposes through out this document. These codes are described in detail by the http specification.

转载于:https://www.cnblogs.com/Joetao/articles/9308701.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值