| 30 | } |
| 31 | |
| 32 | void doGet() { |
| 33 | emscripten_fetch_attr_t attr; |
| 34 | emscripten_fetch_attr_init(&attr); |
| 35 | attr.attributes = EMSCRIPTEN_FETCH_LOAD_TO_MEMORY; |
| 36 | attr.onsuccess = onGetSuccess; |
| 37 | attr.onerror = onError; |
| 38 | emscripten_fetch(&attr, "newfile.txt"); |
| 39 | } |
| 40 | |
| 41 | void onPostSuccess(emscripten_fetch_t *fetch) { |
| 42 | printf("onPostSuccess URL=%s status=%d\n", fetch->url, fetch->status); |
no test coverage detected