Skip to main content

4 posts tagged with "tweak"

View All Tags

How to Mock HTTP Requests in the Android Yandex Browser

Some time back, we've received feedback from a user stating that they could use our browser extension in mobile using the Yandex browser and gave some feedback about usability. We don't develop for mobile, but when we found out it was possible, we improved our import/export flow to allow users to quickly load in a JSON file with many configurations and operate with the app while mocking requests with tweak. Let's look at how to achieve it.

How to Simulate HTTP Request Errors

Errors handling is part of our work as developers. You can try to ignore them at first, but to offer a good user experience, you don't want your website breaking just because one of the API endpoints decided to give up on you. These days we try to find clever workarounds to run our applications with a graceful degradation strategy. We build software to work in an optimal environment while providing certain fallbacks not to break the experience entirely when there's some disturbance in the system (e.g., lousy network condition, CPU lag, etc.).

In this article, we will understand how to maximize productivity when tackling HTTP requests error handling from a front-end development perspective.

Simulate Delays in HTTP Requests

There might be a few reasons why we would want to delay an HTTP request:

  • You want to test how your UI behaves to a slow response from an upstream service.
  • There's a race condition in my code, and I suspect that it happens when the request to A is slower than the request B.
  • You want to show off that beautiful loading animation you've been working on all day!