the default binder in web api expecst http://url.com/webapi/report/?pageids=3243&pageids=2365 to bind public ihttpactionresult report(list<int> pageids){ // exciting webapi code} i wish bind http://url.com/webapi/report/?pageids=3243,2365 as running out of space in url get . i have created class public class commaseparatedmodelbinder : system.web.http.modelbinding.imodelbinder { public bool bindmodel(httpactioncontext actioncontext, modelbindingcontext bindingcontext) { //binding in here } } and registered in webapiconfig.cs var provider = new simplemodelbinderprovider( typeof(list<int>), new commaseparatedmodelbinder()); config.services.insert(typeof(modelbinderprovider), 0, provider); i have altered method signature use model binder so public ihttpactionresult report( [modelbinder] list<int> pageids){ // exciting webapi code} however break point in binder not being ...
i have 2 simple dokku sites on 1 server. first static html site, , second simple rails app. each app has own tld. sake of argument give them domains: static.com , rails.com. ive used dokku domains plugin set both naked , 'www' domains each site. domain names purchased , setup through namecheap the namecheap domains each have 2 entries: @ | http://www.static.com | url redirect www | static.server.com | cname(alias) @ | http://www.rails.com | url redirect www | rails.server.com | cname(alias) i encountered this issue on dokku github page indicate can overcome using naked domain app name when creating original git remote. git remote add dokku dokku@server.com:static.com however, issue closed 2 years ago, , same result seems accomplished domains plugin. im wondering if should restart point both apps? so far above steps has resulted in traffic both domains being sent static.com. has encountered before? t...
in delphi 7, have widestring encoded base64(that received web service widestring result) : pd94bwwgdmvyc2lvbj0ims4wij8+dqo8c3ryaw5nptiq2lpyqjwvc3ryaw5npg== when decoded it, result not utf-8: <?xml version="1.0"?> <string>طھط³طھ</string> but when decoded base64decode.org, result true : <?xml version="1.0"?> <string>تست</string> i have use encddecd unit decodestring function. the problem have using decodestring . function, in delphi 7, treats decoded binary data being ansi encoded. , problem text utf-8 encoded. to continue encddecd unit have couple of options. can switch decodestream . instance, code produce utf-8 encoded text file data: {$apptype console} uses classes, encddecd; const data = 'pd94bwwgdmvyc2lvbj0ims4wij8+dqo8c3ryaw5nptiq2lpyqjwvc3ryaw5npg=='; var input: tstringstream; output: tfilestream; begin input := tstringstream.create(data); try output := tfilestream....
Comments
Post a Comment