Affichage des articles dont le libellé est Flurl (Fluent Url) custom serialization. Afficher tous les articles
Affichage des articles dont le libellé est Flurl (Fluent Url) custom serialization. Afficher tous les articles

lundi 13 février 2017

Flurl (Fluent Url) custom serialization

Vote count: 0

How do I override Flurl's default behaviour when serializing objects to query string values? E.g. the below code

DateTime date = new DateTime(2017, 1, 2, 3, 4, 5);
Url url = "http://domain.com".SetQueryParam("date", date);

produces the following url:

http://ift.tt/2lIR1CD

What I want is this:

http://ift.tt/2lDotyu

which would be the result of serializing the date as follows:

date.ToString("O")

asked 20 secs ago

Let's block ads! (Why?)



Flurl (Fluent Url) custom serialization