info: name: CreateMangaLibrary type: http seq: 4 http: method: POST url: "{{base_url}}/api/libraries" body: type: json data: |- { "name": "My Manga Library", "description": "A collection of manga", "type": "manga" } auth: inherit runtime: scripts: - type: after-response code: |- function onResponse(res) { try { const responseBody = res.getBody(); const id = responseBody.id; if (id) { bru.setEnvVar("manga_library_id", id, { persist: true }); console.log("Library ID saved:", id); } if (!id) { console.log("No id found in response."); } } catch (error) { console.error("Error in post-response script:", error.message); } } onResponse(res); settings: encodeUrl: true timeout: 0 followRedirects: true maxRedirects: 5