Closed rorlic closed 3 months ago
Same behavior can be seen using curl:
Incorrect:
$ curl -I http://localhost:9003/ldes/admin/api/v1/dcat -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,
image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: text/html
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:10:56 GMT
$ curl -I http://localhost:9003/ldes/admin/api/v1/eventstreams -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: text/html
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:11:02 GMT
$ curl -I http://localhost:9003/ldes/admin/api/v1/eventstreams/boorgat -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: text/html
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:11:06 GMT
$ curl -I http://localhost:9003/ldes/admin/api/v1/eventstreams/boorgat/shape -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: text/html
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:11:24 GMT
Correct:
$ curl -I http://localhost:9003/ldes/admin/api/v1/eventstreams/boorgat/views -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: application/ld+json
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:11:12 GMT
$ curl -I http://localhost:9003/ldes/admin/api/v1/eventstreams/boorgat/views/by-page -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP/1.1 200
Content-Type: application/ld+json
Transfer-Encoding: chunked
Date: Thu, 21 Mar 2024 10:11:17 GMT
When requesting
/admin/api/v1/eventstreams
using a browser (which sends headerAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
) the server returnsContent-type: text/html
instead of a RDF type.The following endpoints have the same behavior:
/admin/api/v1/dcat
/admin/api/v1/eventstreams/<collection>/shape
/admin/api/v1/eventstreams/<collection>
Requesting the following endpoint correctly returns a RDF type (
Content-type: application/ld+json
):/admin/api/v1/eventstreams/<collection>/views
/admin/api/v1/eventstreams/<collection>/views/<view>