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

Output not repeated when calling the same API, even if one should be partial data. #608

Open
tarasis opened this issue Feb 25, 2024 · 4 comments

Comments

@tarasis
Copy link

tarasis commented Feb 25, 2024

I was testing out an API I am self hosting and was testing out your SW (saw it used in a video and was considering buying it as it looks useful).

I noticed that if I made two requests to the same specific API, the right side showed the output only once, even though the first time I printed just one element, and the next time I was a logging everything returned.

Note right side only lists iPhone 9, which is the partial output from the returned JSON (listed fully below)

Screenshot 2024-02-25 at 23 40 32

If I make the old school fetch usage get the second product I get the name from product 1, and the full details of product two.

Screenshot 2024-02-25 at 23 40 13

Adding a second instance of test() doesn't cause a second "iPhone 9" to appear in the output.

This happened on 2.10.1 which I had downloaded yesterday or friday, and 2.11 which I downloaded today.


Json output for product 1

{
  id: 1,
  title: 'iPhone 9',
  description: 'An apple mobile which is nothing like apple',
  price: 549,
  discountPercentage: 12.96,
  rating: 4.69,
  stock: 94,
  brand: 'Apple',
  category: 'smartphones',
  thumbnail: 'https://cdn.dummyjson.com/product-images/1/thumbnail.jpg',
  images: [
    'https://cdn.dummyjson.com/product-images/1/1.jpg',
    'https://cdn.dummyjson.com/product-images/1/2.jpg',
    'https://cdn.dummyjson.com/product-images/1/3.jpg',
    'https://cdn.dummyjson.com/product-images/1/4.jpg',
    'https://cdn.dummyjson.com/product-images/1/thumbnail.jpg'
  ]
}
@tarasis
Copy link
Author

tarasis commented Feb 25, 2024

Trying to get it to print out two different fields via two different methods also doesn't work

Screenshot 2024-02-25 at 23 55 00

@habibur4340
Copy link

habibur4340 commented Feb 26, 2024

Hey @tarasis
I encountered a peculiar behavior in versions 2.10.1 and 2.11 where making two consecutive requests to the same API endpoint results in the UI only displaying the output of the first request. The first request's output was partial (just one element, "iPhone 9"), and the second request was supposed to log everything returned, but the UI failed to update to show the full details.

Recommendation:
For those experiencing similar issues or seeking a comprehensive tool for API testing and monitoring, consider using Apidog. It offers robust features for simulating, testing, and documenting API behaviors, which could be invaluable in troubleshooting and ensuring API reliability.

@lukehaas
Copy link
Owner

@tarasis, thanks for raising this. I will look into it 👍

@tarasis
Copy link
Author

tarasis commented Feb 26, 2024

Hey @habibur4340, you obvioius AI rewriter and advertiser

Screenshot 2024-02-26 at 09 35 04

@lukehaas wonderful, thank you!

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

3 participants