Is there a WebClient object that can be used in MonoTouch? - xamarin.ios

Is there a WebClient object that can be used in MonoTouch?

You may use the "standard" WebClient. See an example here. Someone reported that https is problematic in monotouch so you may find a workaround here
EDIT https (SSL/TLS) support has been available in MonoTouch for a few years now

A full sample that shows http, https using the .NET APIs as well as one using the Cocoa API is available in:
Github
The short sort story is: just use System.Net.WebRequest as you would with regular .NET

Related

PWA InkCanvas save strokes as svg in javascript

I need to use InkCanvas in my web application using javascript (angular), is it possible to save InkCanvas as a SVG using javascript (or convert InCanvas to canvas)? i see this, but it seems it works for C#, i need a way to do it in javascript!
I think InkCanvas is only supported in Universal Windows Platform (UWP) for Windows10. This is confirmed in this SO post.
You can use Webassembly to run C# code in web browser using some JS helpers. Here is a post explaining the same.
You can try this with the c# code that you are interested in. Compatibility depended. These are relatively new features and only way to know is to try.

Missing Authentication Request/Response POCOs in ServiceStack Clients

After reading a lot about ServiceStack, I think it's such a beautiful work of art and I decided to use it for our upcoming Xamarin iOS App.
The problem currently is that after installing the ServiceStack.Client for Xamarin.iOS, I can't find the Request/Response DTOs (i.e POCOs) that are used for registration or authentication given that I have enabled the Authentication and Registration Plugins in the service host.
After digging into the source code, I found those Request/Response DTOs to reside in ServiceStack assembly which is a huge dependency and I don't think I can include it in our iOS App.
is there a way around that ? shouldn't these DTOs be shipped as well with the ServiceStack clients themselves under maybe ServiceStack.Client.Auth ?
Thanks
Sorry, I guess I found them already available inside ServiceStack.Client .. what confused me is that I took some sample code from the C# client wiki and the DTOs were named differently and not available .. Thanks –

How to consume a Servicestack.net rest method with IreturnVoid

I am implementing some of the new API features of ServiceStack, specifically trying to use IReturnVoid. I am consuming the service in Monotouch, but all the clients expect a response type.
Is this just a matter of the Monotouch API getting updated to support the IReturnVoid type?
Use the client.SendOneWay() method.
The MonoTouch / MonoDroid libraries are a little behind the full release, something we hope to rectify soon.

Monotouch consuming ASP.NET Web Api

I have a Monotouch project that today uses WCF Web Services to get data. Now I want to migrate it in order to start using ASP.NET Web Api Json.
Does anyone know how can I send a viewmodel data from a ASP.NET Web Api and then read it in monotouch?
Thanks for the help in advance.
I think you should read this Xamarin article.
In general, Web API is just standard HTTP passing either XML or JSON back and forth. There is not necessarily a client framework accessing it--you can consume it with raw HttpWebRequests or the equivalent in whichever programming language you are using.
Considering that, your options are:
Use an open-source library to do it (something like RestSharp)
Create the HttpWebRequest calls, and format the XML or JSON for the requests and responses yourself (you can use the .Net BCL to do this or other open source projects)
I tend to do the former, just because I like fine grained control of what is going on. #1 might be easier for you though.

Recommend a HTTP component for Delphi 2010 allowing Range'd downloads

Can you advice me a shareware HTTP component for Delphi 2010?
I want to use it as HTTP multithread .exe file downloader.
I.e. one big .exe file will be downloaded in several threads.
Indy (included with Delphi) is blocking, which I find makes it much easier to include in threads.
There are also the following freeware components:
ICS - non-blocking
Synapse - Blocking
Personally, I prefer Indy. I have used and like ICS, and I have heard good things about Synapse. You can't really go wrong.
UPDATE:
I see you've made the question more specific, asking for details on using HTTP range.
This can be done in Indy using the request.range property. There is a working example here.
May be you can check Clever Components Internet Suite and see Multi Downloader demo
I haven't worked with Delphi 2010 yet, but I believe you can still import ActiveX type libraries. I've used MSXML2_TLB and WinHttp_TLB before to perform HTTP requests.
Some people don't like using third party components for Internet access. If you prefer, you can use WinInet directly.
It's more verbose, but this can be used from Delphi. And, of course, HTTP Range is also supported.

Resources