@@ -242,9 +242,9 @@ The following methods on context object are supported.
242242### httpCall
243243
244244``` {.sourceCode .cpp}
245- void httpCall(StringView cluster,
245+ void httpCall(std::string_view cluster,
246246 const HeaderStringPairs& request_headers,
247- StringView request_body,
247+ std::string_view request_body,
248248 const HeaderStringPairs& request_trailers,
249249 uint32_t timeout_milliseconds,
250250 HttpCallCallback callback)
@@ -270,13 +270,13 @@ called when the HTTP request finishes.
270270
271271``` {.sourceCode .cpp}
272272template<typename Response>
273- void grpcSimpleCall(StringView service,
274- StringView service_name,
275- StringView method_name,
273+ void grpcSimpleCall(std::string_view service,
274+ std::string_view service_name,
275+ std::string_view method_name,
276276 const google::protobuf::MessageLite &request,
277277 uint32_t timeout_milliseconds,
278278 std::function<void(Response&& response)> success_callback,
279- std::function<void(GrpcStatus status, StringView error_message)> failure_callback)
279+ std::function<void(GrpcStatus status, std::string_view error_message)> failure_callback)
280280```
281281
282282Makes a unary gRPC call to an upstream host.
@@ -304,9 +304,9 @@ invoked when gRPC call fails. *status* is the returned gRPC status code.
304304
305305``` {.sourceCode .cpp}
306306void grpcCallHandler(
307- StringView service,
308- StringView service_name,
309- StringView method_name,
307+ std::string_view service,
308+ std::string_view service_name,
309+ std::string_view method_name,
310310 const google::protobuf::MessageLite &request,
311311 uint32_t timeout_milliseconds,
312312 std::unique_ptr<GrpcCallHandlerBase> handler)
@@ -323,9 +323,9 @@ target for callback and fine grained control on the call.
323323### grpcStreamHandler
324324
325325``` {.sourceCode .cpp}
326- void grpcStreamHandler(StringView service,
327- StringView service_name,
328- StringView method_name,
326+ void grpcStreamHandler(std::string_view service,
327+ std::string_view service_name,
328+ std::string_view method_name,
329329 std::unique_ptr<GrpcStreamHandlerBase> handler)
330330```
331331
@@ -367,7 +367,7 @@ Header API
367367### addRequestHeader
368368
369369``` {.sourceCode .cpp}
370- void addRequestHeader(StringView key, StringView value)
370+ void addRequestHeader(std::string_view key, StringView value)
371371```
372372
373373Adds a new request header with the key and value if header does not
@@ -378,7 +378,7 @@ only when called in
378378### replaceRequestHeader
379379
380380``` {.sourceCode .cpp}
381- void replaceRequestHeader(StringView key, StringView value)
381+ void replaceRequestHeader(std::string_view key, StringView value)
382382```
383383
384384Replaces the value of an existing request header with the given key, or
@@ -389,7 +389,7 @@ method is effective only when called in
389389### removeRequestHeader
390390
391391``` {.sourceCode .cpp}
392- void removeRequestHeader(StringView key)
392+ void removeRequestHeader(std::string_view key)
393393```
394394
395395Removes request header with the given key. No-op if the request header
@@ -410,7 +410,7 @@ effective only when called in
410410### getRequestHeader
411411
412412``` {.sourceCode .cpp}
413- WasmDataPtr getRequestHeader(StringView key)
413+ WasmDataPtr getRequestHeader(std::string_view key)
414414```
415415
416416Gets value of header with the given key. Returns empty string if header
@@ -437,7 +437,7 @@ contains header pairs data.
437437### addResponseHeader
438438
439439``` {.sourceCode .cpp}
440- void addResponseHeader(StringView key, StringView value)
440+ void addResponseHeader(std::string_view key, StringView value)
441441```
442442
443443Adds a new response header with the key and value if header does not
@@ -448,7 +448,7 @@ only when called in
448448### replaceResponseHeader
449449
450450``` {.sourceCode .cpp}
451- void replaceResponseHeader(StringView key, StringView value)
451+ void replaceResponseHeader(std::string_view key, StringView value)
452452```
453453
454454Replaces the value of an existing response header with the given key, or
@@ -459,7 +459,7 @@ This method is effective only when called in
459459### removeResponseHeader
460460
461461``` {.sourceCode .cpp}
462- void removeResponseHeader(StringView key)
462+ void removeResponseHeader(std::string_view key)
463463```
464464
465465Removes response header with the given key. No-op if the response header
@@ -480,7 +480,7 @@ is effective only when called in
480480### getResponseHeader
481481
482482``` {.sourceCode .cpp}
483- WasmDataPtr getResponseHeader(StringView key)
483+ WasmDataPtr getResponseHeader(std::string_view key)
484484```
485485
486486Gets value of header with the given key. Returns empty string if header
@@ -507,7 +507,7 @@ holds the header pairs.
507507### addRequestTrailer
508508
509509``` {.sourceCode .cpp}
510- void addRequestTrailer(StringView key, StringView value)
510+ void addRequestTrailer(std::string_view key, StringView value)
511511```
512512
513513Adds a new request trailer with the key and value if trailer does not
@@ -518,7 +518,7 @@ only when called in
518518### replaceRequestTrailer
519519
520520``` {.sourceCode .cpp}
521- void replaceRequestTrailer(StringView key, StringView value)
521+ void replaceRequestTrailer(std::string_view key, StringView value)
522522```
523523
524524Replaces the value of an existing request trailer with the given key, or
@@ -529,7 +529,7 @@ This method is effective only when called in
529529### removeRequestTrailer
530530
531531``` {.sourceCode .cpp}
532- void removeRequestTrailer(StringView key)
532+ void removeRequestTrailer(std::string_view key)
533533```
534534
535535Removes request trailer with the given key. No-op if the request trailer
@@ -550,7 +550,7 @@ effective only when called in
550550### getRequestTrailer
551551
552552``` {.sourceCode .cpp}
553- WasmDataPtr getRequestTrailer(StringView key)
553+ WasmDataPtr getRequestTrailer(std::string_view key)
554554```
555555
556556Gets value of trailer with the given key. Returns empty string if
@@ -575,7 +575,7 @@ holds the trailer pairs.
575575### addResponseTrailer
576576
577577``` {.sourceCode .cpp}
578- void addResponseTrailer(StringView key, StringView value)
578+ void addResponseTrailer(std::string_view key, StringView value)
579579```
580580
581581Adds a new response trailer with the key and value if trailer does not
@@ -586,7 +586,7 @@ only when called in
586586### replaceResponseTrailer
587587
588588``` {.sourceCode .cpp}
589- void replaceResponseTrailer(StringView key, StringView value)
589+ void replaceResponseTrailer(std::string_view key, StringView value)
590590```
591591
592592Replaces the value of an existing response trailer with the given key,
@@ -597,7 +597,7 @@ This method is effective only when called in
597597### removeResponseTrailer
598598
599599``` {.sourceCode .cpp}
600- void removeResponseTrailer(StringView key)
600+ void removeResponseTrailer(std::string_view key)
601601```
602602
603603Removes response trailer with the given key. No-op if the response
@@ -618,7 +618,7 @@ method is effective only when called in
618618### getResponseTrailer
619619
620620``` {.sourceCode .cpp}
621- WasmDataPtr getResponseTrailer(StringView key)
621+ WasmDataPtr getResponseTrailer(std::string_view key)
622622```
623623
624624Gets value of trailer with the given key. Returns empty string if
@@ -733,7 +733,7 @@ host stats sink.
733733#### New
734734
735735``` {.sourceCode .cpp}
736- static Counter<Tags...>* New(StringView name, MetricTagDescriptor<Tags>... fieldnames)
736+ static Counter<Tags...>* New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames)
737737```
738738
739739Create a new counter with the given metric name and tag names. Example
@@ -816,7 +816,7 @@ Returns current value of a counter.
816816#### New
817817
818818``` {.sourceCode .cpp}
819- static Gauge<Tags...>* New(StringView name, MetricTagDescriptor<Tags>... fieldnames)
819+ static Gauge<Tags...>* New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames)
820820```
821821
822822Create a new gauge with the given metric name and tag names. Example
@@ -900,7 +900,7 @@ Returns current value of a gauge.
900900#### New
901901
902902``` {.sourceCode .cpp}
903- static Histogram<Tags...>* New(StringView name, MetricTagDescriptor<Tags>... fieldnames)
903+ static Histogram<Tags...>* New(std::string_view name, MetricTagDescriptor<Tags>... fieldnames)
904904```
905905
906906Create a new histogram object with the given metric name and tag names.
@@ -1138,7 +1138,7 @@ Returns the start pointer of the data.
11381138#### view
11391139
11401140``` {.sourceCode .cpp}
1141- StringView view()
1141+ std::string_view view()
11421142```
11431143
11441144Returns data as a string view constructed with the start pointer and the
@@ -1155,7 +1155,7 @@ Returns data as a string by converting the string view to string.
11551155#### pairs
11561156
11571157``` {.sourceCode .cpp}
1158- std::vector<std::pair<StringView , StringView>> pairs()
1158+ std::vector<std::pair<std::string_view , StringView>> pairs()
11591159```
11601160
11611161Returns a vector of string view pair parsed from the data.
0 commit comments