Request Replay

Difficulty: MEDIUMCategory: LLDFrequency: 1Asked On 2025-06-02

Problem Statement

Source files: https://drive.google.com/file/d/1-kyWk0KvBdG7Io6E9BJYJ9cuR9Vl3X18/view?usp=sharing

When using Java, it's recommended to familiarize yourself with reading JSON files, using Gson to parse JSON into objects, and performing GET/POST operations with OkHTTP.

The first step is to send a request based on the content of a JSON file, receive the response, and then check if the status code matches. This is relatively straightforward.

The second step involves sending a request based on another JSON file, while simultaneously retrieving new IDs from the API's response and replacing some of the original IDs in the JSON file's request. This isn't too difficult either; you can work through it gradually.

Solution

Comments