interface http-types { type http-status = u16; type body = list; type headers = list>; type params = list>; type uri = string; enum method { get, post, put, delete, patch, head, options, } record request { method: method, uri: uri, headers: headers, params: params, body: option, } record response { status: http-status, headers: option, body: option, } enum http-error { success, destination-not-allowed, invalid-url, request-error, runtime-error, too-many-requests, } }