Rest: remove status code from main action
Today we give the HTTP status back within the HTTP response itself and within the JSON response as well: ```sh curl localhost:9200/ ``` ```js { "status" : 200, "name" : "Red Wolf", "version" : { "number" : "2.0.0", "build_hash" : "6837a61d8a646a2ac7dc8da1ab3c4ab85d60882d", "build_timestamp" : "2014-08-19T13:55:56Z", "build_snapshot" : true, "lucene_version" : "4.9" }, "tagline" : "You Know, for Search" } ```
This commit is contained in:
parent
261eb5b5ce
commit
052645903a
|
@ -89,6 +89,11 @@ with values in a single array.
|
|||
}
|
||||
---------------
|
||||
|
||||
=== Main API
|
||||
|
||||
Previously, calling `GET /` was giving back the http status code within the json response
|
||||
in addition to the actual HTTP status code. We removed `status` field in json response.
|
||||
|
||||
=== Java API
|
||||
|
||||
Some query builders have been removed or renamed:
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
"Info":
|
||||
- do: {info: {}}
|
||||
- match: {status: 200}
|
||||
- is_true: name
|
||||
- is_true: cluster_name
|
||||
- is_true: tagline
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
---
|
||||
"Lucene Version":
|
||||
- do: {info: {}}
|
||||
- match: {status: 200}
|
||||
- is_true: version.lucene_version
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,6 @@ public class RestMainAction extends BaseRestHandler {
|
|||
}
|
||||
|
||||
builder.startObject();
|
||||
builder.field("status", status.getStatus());
|
||||
if (settings.get("name") != null) {
|
||||
builder.field("name", settings.get("name"));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue