Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference of output between explorer and actual API #1124

Open
jackdeguest opened this issue Aug 29, 2023 · 3 comments
Open

Difference of output between explorer and actual API #1124

jackdeguest opened this issue Aug 29, 2023 · 3 comments

Comments

@jackdeguest
Copy link

jackdeguest commented Aug 29, 2023

Regarding the endpoint /v1/diff/{distribution}[1] there is a difference of output between the API explorer and the live API.

The explorer returns a plain text diff, whereas the live API returns JSON data.

Here I have used HTTP-Message as an example.

[1]

sub release : Chained('index') : PathPart('release') : Args(1) {

@oalders
Copy link
Member

oalders commented Aug 29, 2023

I'm guessing we'd need to be looking here:

my $ct = try { $c->req->preferred_content_type };

@oalders
Copy link
Member

oalders commented Aug 29, 2023

The explorer looks to be sending

Accept: text/plain, */*; q=0.01

@jackdeguest
Copy link
Author

The explorer looks to be sending

Also, every method in MetaCPAN::Server::Controller::Diff is calling _do_diff by passing it a true value for $include_raw as the final argument.

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

No branches or pull requests

2 participants