(path param
getPathParamsRequest()
Nome | Tipo | Descrição |
---|---|---|
jParams | JsonObject | objeto json com parametros path parampathparam da requisição |
#include "tlpp-core.th" #include "tlpp-rest.th" @Get("/documentation/getPathParamsRequest/:cKey") Function u_fGetPathParamsRequest() local cResponse := "" local cRet := "" local jParams := JsonObject():New() jParams := oRest:getPathParamsRequest() cRet := jParams['cKey'] if (valtype(cRet) == 'C') cResponse := '{"getPathParamsRequest":"' + cValToChar(cRet) + '"}' //cRet vai ter valor igual a "TOTVS" else cResponse := '{"getPathParamsRequest": "metodo getPathParamsRequest nao foi executado"}' endif return oRest:setResponse(cResponse)
07/2019