From 16c03e83892f925b542dafbdb9b9d1256dcf12b5 Mon Sep 17 00:00:00 2001 From: bitliu Date: Thu, 22 Apr 2021 19:54:47 +0800 Subject: [PATCH] Update proxy_wasm_api.h --- proxy_wasm_api.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proxy_wasm_api.h b/proxy_wasm_api.h index 61eabe5..3fff687 100644 --- a/proxy_wasm_api.h +++ b/proxy_wasm_api.h @@ -905,6 +905,14 @@ inline WasmResult setBuffer(WasmBufferType type, size_t start, size_t length, st return result; } +inline WasmDataPtr getResponseBodyBufferBytes(size_t start, size_t length) { + return getBufferBytes(WasmBufferType::HttpResponseBody, start, length); +} + +inline WasmDataPtr getRequestBodyBufferBytes(size_t start, size_t length) { + return getBufferBytes(WasmBufferType::HttpRequestBody, start, length); +} + // HTTP inline void MakeHeaderStringPairsBuffer(const HeaderStringPairs &headers, void **buffer_ptr,