Skip to content

fix: set accept: application/x-ndjson in fetching live logs#194

Merged
magurotuna merged 1 commit intodenoland:mainfrom
magurotuna:fix-live-log
Nov 17, 2023
Merged

fix: set accept: application/x-ndjson in fetching live logs#194
magurotuna merged 1 commit intodenoland:mainfrom
magurotuna:fix-live-log

Conversation

@magurotuna
Copy link
Copy Markdown
Member

@magurotuna magurotuna commented Nov 15, 2023

Fixes #188

This commit sets accept: application/x-ndjson header when fetching live logs.

image

The backend API returns newline-delimited JSON in case of accept: application/x-ndjson OR no accept header with the priority of application/json being higher than application/x-ndjson. In other words, it returns pure JSON response only when the accept header is present such that application/json has higher precedence than application/x-ndjson. So in general it defaults to newline-delimited JSON, but we got this issue because all API calls made by deployctl set accept: application/json explicitly.

@magurotuna magurotuna merged commit 5aa4fee into denoland:main Nov 17, 2023
@magurotuna magurotuna deleted the fix-live-log branch November 17, 2023 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

log streaming does not work

2 participants