Httprequest/post/gives error on ":' in the payload

Hi,

I am getting this error when I try to do an API post with the following payload:
Date = “2024-03-01T00:00:00.000Z”
This gives me the following err:

expecting serialized type ‘SearchRequest’,
got string starting with: Date=2024-03-2024-03-01T00%3A00%3A00.000Z\n at ServiceStack.Text.Common.DeserializeTypeRefJson.StringToType(Type type,
String strType,
EmptyCtorDelegate ctorFn,

Basically, it is converting the “:” to %3A since it is a reserved character.
is there is anyway to render it same? since the API is expecting exact format

can you share with us details / screenshots on how it passed (e.g. body / payload)?

give a try at
"'2024-03-2024-03-01T00:00:00.000Z'"
or
"""2024-03-2024-03-01T00:00:00.000Z"""

Thank You Peter, the second one works.

@Nick101
Perfect, so the topic can be closed

Yes, please. Can I also close this from my menu?

yes as shown in the shared link. mark the solving post as solution

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.