0

i am using the eventstore http api to get events from an persistent subscription. It works, but the response give me an xml structure instead of json. Can anyone tell me what's wrong with my request?

> GET /subscriptions/integration-2023-05-31/Test1_Subscription HTTP/2
> Host: [removed].germanywestcentral.cloudapp.azure.com:2113
> user-agent: insomnia/2023.2.2
> content-type: application/vnd.eventstore.competingatom+json
> authorization: Basic [removed]
> accept: */*

answers with

 HTTP/2 200 
 < content-type: application/vnd.eventstore.competingatom+xml; charset=utf-8
 < date: Wed, 31 May 2023 13:14:01 GMT
 < server: Kestrel
 < access-control-allow-headers: Content-Type, X-Requested-With, X-Forwarded-Host, X-Forwarded-Prefix, X-PINGOTHER, Authorization, ES-LongPoll, ES-ExpectedVersion, ES-EventId, ES-EventType, ES-RequireMaster, ES-RequireLeader, ES-HardDelete, ES-ResolveLinkTos
 < access-control-allow-methods: PUT, POST, DELETE, GET, GET, OPTIONS
 < access-control-allow-origin: *
 < access-control-expose-headers: Location, ES-Position, ES-CurrentVersion
 < content-length: 2033

Thanks for help.

1 Answers1

0

I haven't tried myself, but the docs says the following:

The preferred way of determining which content type responses EventStoreDB serves is to set the Accept header on the request. As some clients do not deal well with HTTP headers when caching, appending a format parameter to the URL is also supported, for example, ?format=xml.

Please keep in mind that AtomPub is on its deprecation route and will disappear at some point.

Alexey Zimarev
  • 17,944
  • 2
  • 55
  • 83