info: name: CreateComicLibrary type: http seq: 3 http: method: POST url: "{{base_url}}/api/libraries" body: type: json data: |- { "name": "My Comic Library", "description": "A collection of comics", "type": "comics" } auth: inherit runtime: scripts: - type: after-response code: |- function onResponse(res) { try { const responseBody = res.getBody(); const id = responseBody.id; if (id) { bru.setEnvVar("comic_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