You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Using non-standard HTTP headers to configure Structr

Structr supports a number of non-standard HTTP headers that allow users to configure some internal aspects of how Structr behaves when executing REST calls. The following headers are supported.

Structr-Return-Details-For-Created-Objects

When set, Structr will return details for every object created in a request, instead of the default behaviour of returning only the UUID of the primary object.

Example

$ curl -si -HX-User:admin -HX-Password:admin -H"Structr-Return-Details-For-Created-Objects: true" http://localhost:8082/structr/rest/Project -XPOST

Response

HTTP/1.1 201 Created
Date: Tue, 11 Jun 2019 13:12:01 GMT
Strict-Transport-Security: max-age=60
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1;mode=block
Content-Type: application/json;charset=utf-8
Set-Cookie: JSESSIONID=e574b4a765b61e9c20b84733124a52e31uwox321edgkt1uni8dijoi7tw8.e574b4a765b61e9c20b84733124a52e3;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Structr-Edition: Enterprise
Location: http://localhost:8082/structr/rest/Project/5f389630ed7d460bb117364e38392d9a
Vary: Accept-Encoding, User-Agent
Transfer-Encoding: chunked
Server: Jetty(9.4.18.v20190429)

{
        "result": [
                {
                        "type": "Project",
                        "id": "5f389630ed7d460bb117364e38392d9a"
                }
        ],
        "result_count": 1,
        "page_count": 1,
        "result_count_time": "0.000018762",
        "serialization_time": "0.000379113"
}

Search results for "Using non-standard HTTP headers to configure Structr"

We could not find anything matching "Using non-standard HTTP headers to configure Structr" in our documentation. Please rephrase your search.

You can also ask your questions in the Structr Google Group or create a free account in the Structr Support Portal.
Click here to send feedback to the Structr team.