MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / onPostSuccess

Function onPostSuccess

test/fetch/test_fetch_post.c:41–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void onPostSuccess(emscripten_fetch_t *fetch) {
42 printf("onPostSuccess URL=%s status=%d\n", fetch->url, fetch->status);
43 assert(fetch->status == 200);
44 // The data is now available at fetch->data[0] through fetch->data[fetch->numBytes-1];
45 emscripten_fetch_close(fetch); // Free data associated with the fetch.
46
47 // Now attempt to GET the POST'ed file
48 doGet();
49}
50
51int main() {
52 // Upload a file using `POST` with `?file=`

Callers

nothing calls this directly

Calls 4

printfFunction · 0.85
emscripten_fetch_closeFunction · 0.85
doGetFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected