refit icon indicating copy to clipboard operation
refit copied to clipboard

Cannot encoding string parameter with '&' correctly.

Open zsp1987 opened this issue 9 years ago • 2 comments

Tring to create a function with

[Get("/api/cases/statistics/{countyId}/{judgeId}/{reliefSought}/DecisionTimeByReleifSought")] Task<JudgeReliefSought5NumberSummary> GetJudgeReliefSought5NumberSummary(string countyId, string judgeId, string reliefSought);

However, when I set var reliefSought = 'JUDGMENT OF FORECLOSURE & SALE' with & inside.

The function cannot encoding this correctly and request the right url.

zsp1987 avatar Mar 29 '17 01:03 zsp1987

I'm not really sure that refit should do anything about this, you can always encode the fragment yourself if you want to pass refit invalid url text.

dotnetchris avatar Sep 19 '17 15:09 dotnetchris

values passed in should be UrlEncoded by Refit if used on the path/query string. Will look closer.

clairernovotny avatar Jan 28 '18 23:01 clairernovotny