httpodatahttp-getsap-gateway

How to send EDM.TIME as a parameter in HTTP GET request


Can't find how to send edm.time as a parameter in get request in an url. Tried many variations but with no luck.

I think it has to do maybe with character escaping but it didn't work for me either, I'm probably missing out something.

For example, I tried:

http::<some_url>/some_func?time=time120000

EDIT 1:

I tried the example from the other thread posted here and it also doesn't work: /func(time=‘PT11H00M00S’). this raises an error.

EDIT 2:

I'm trying to pass this edm.time to a function import. dataserviceversion version is 2.0.

<FunctionImport Name ="<some_func>" m:HttpMethod="GET" ReturnType="<string>">
   <Parameter Name="timeIN" Type="Edm.Time" Precision="0" Mode="In" />
</FunctionImport>

Solution

  • Answer is: func_imp_ex?timeIN=time'PT18H31M41S'

    Needed to prefix the string with the word key 'time'