Cenários de utilização: -------------------------------------------------------------------------------------------------------------- A) Com token + If-None-Match + quer 304 Public Async Function ConfigLoadInfoDelta(req As WCFServiceEP.ConfigLoadInfoRequest) _ As Task(Of WCFServiceEP.DefaultResponseOfConfigLoadInfoResponse) Dim defaultFactory As Func(Of WCFServiceEP.DefaultResponseOfConfigLoadInfoResponse) = Function() Return New WCFServiceEP.DefaultResponseOfConfigLoadInfoResponse With { .value = Nothing, .result = New WCFServiceEP.Result With {.code = -1} } End Function Try Dim opt = RSEndpointExecutionOptions.WithHeaders( tokenSID:=GetTokenSID(), clientIfNoneMatch:=GetClientIfNoneMatch(), handle304:=True ) Return Await RSEndpointWebApiHelper.ExecuteAsync( action:=Function() EP_WCFService.service.ConfigLoadInfoAsync(req), defaultValueFactory:=defaultFactory, options:=opt ).ConfigureAwait(False) Catch ex304 As HttpResponseException Throw Catch ex As Exception Dim noTask = Common.FixErrors.LogErrorAsync(MethodBase.GetCurrentMethod, ex).ConfigureAwait(False) Return defaultFactory() End Try End Function -------------------------------------------------------------------------------------------------------------- B) Chamada “anônima” (sem token/sem If-None-Match), mas ainda quer injetar headers Dim opt = RSEndpointExecutionOptions.WithHeaders(handle304:=False) ' TokenSID/IfNoneMatch = Nothing -------------------------------------------------------------------------------------------------------------- C) Sem header context e sem 304 (a maioria) Dim opt = RSEndpointExecutionOptions.None() ' ou nem passe options --------------------------------------------------------------------------------------------------------------