RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
News

Developer Skill Sprint – Using the New Native HTTP Client Libraries

Author: Developer Skill Sprints

 

More Information

YouTube Replay

{“video”:”http://youtu.be/lQhcvEGeRkw”,”width”:”undefined”,”height”:”undefined”}

Q&A Log

Q: May I ask about OAUTH 1.0 on yahoo messenger. I’m using XE8. I’ve also tried the RESTClient too, but not the OAUTH component yet. Thanks
A: You need to use the OAUTH component for OAUTH support. You can check out the OAuth skill sprint for more information 

Q: are there also a view component like the wrapper of IE in earlier versions of Delphi ?
A: Yes, TWebBrowser.

Q: In Indy I can give the browser another name which could be used to deny browsers access. Is this still possible in this components? (Using Request.UserAgent)
A: UserAgent on the Client  

Q: How to set timeout for the request ?
A: Don’t think so. You can use the event handlers to check the status and abort.

Q: How to do SSL-Pinning (since the DocWiki states the OnValiudateServerCertificate Event occurs when the server certificate is invalid
A: There is a different event for requesting a certificate.

Q: One more Question – Are Webservices (imported via WSDL) built on base of these new components?
A: I don’t think so, not yet. But you may be able to do it manually.

Q: Again SSL-Pinning: The DocWiki says that the OnValididateServerCertificate Event ONLY fires when the server certificate is invalid. To check for a specific certificate (or CA) we need to get the event also wehn the certificate is valid. So how do ssl-pinning
A: Al will test that and post the results on the blog notes later.

Q: OAuth services are using Indy?
A: They are using the new native client library.

Q: Thanks for this webinar!
A: Your welcome!

Q: Did I get it right that the OnValidateServerCertificate is only invoked when the certificate is INVALID? the docwiki states that it is ” fired when checking the validity of a server certificate”
A: The docwiki does say:  If the server provides an SSL certificate, but this certificate is invalid, the OnValidateServerCertificate event occurs. Provide an event handler for OnValidateServerCertificate so that you can check the server certificate (Certificate) and determine whether or not you accept the server certificate. If you accept the server certificate, change the value of the Accept parameter to True.

Q: for server side SSL development, is OPENSSL still a requirement?
A: Yes, on the server you do.

Q: Where can we get examples on C++ Builder?
A: All the examples shown are both C++ and Object Pascal. 

Q: How to handle different encoding on the servers
A: Use the AcceptEncoding property on the client to tell the server what encodings you want. 

Q: I was a little confused on extracting the links from something like Box2d where you were able to see all of the available links from that site, are you stating I can put in any type of URL and extract all available links offered by the web site ?
A: Yes, the sample app has code that does this.

Q: Since we have components for REST client stuff- Do you guys also plan making stuff for being a RESTful server?
A: Enterprise Mobility Server is a RESTful server.

Q: When will the new HTTP client be used in a DataSnap Rest Client? I think it currently still requires OpenSSL. .
A: Soon. In a future release.

Q: are TNetHTTPClient/Request part of Delphi XE8 Professional?
A: Yes.  I do see the Feature Matrix for XE8 Pro says:  New HTTP client framework, mapped to platforms libraries on all supported platforms, including also platform HTTPS support (with no need to deploy the OpenSLL library)

Q: You said it was a block request, do we still need the antifreeze component to continue update the display like in indy?
A: No, it doesn’t freeze the UI. To track the progress of the downloaded data, use the values of AContentLength and AReadCount in the OnReceiveData event handler.

Q: Is the new HTTP Client library based on “WinINet” or on “WinHTTP”?
A: Looking into the source code, I do see:  {$HPPEMIT ‘#pragma comment(lib, “winhttp”)’}

Q: Can the new HTTP components be used in applications running as a windows service?
A: It should work, but Al will try it out.

Q: Any plans to have them available for DataSnap?
A: Currently for XE8 they don’t support DataSnap. In theory you could update DataSnap yourself, or it will be included in a future release. Check the roadmap and get on Update Subscription so you are invited to the beta.

Q: Are there any Delphi ISAPI (DataSnap) examples running in Azure using AJAX calls to utilize the DataSnap resource calls. For example I am getting Cross-domain (CORS) errors and very little help is available
A: There are, Al will research and get back to you.

Q: Does the REST debugger tool, which ships with XE8, use the new HTTP Client components? 
A: The REST client components use the new native HTTP client components. So it should be using them.

Q: Are there any examples of using SSL, or is it a bit transparent now?
A: It is transparent now, but Al will add an example.

 

Q: Thanks
A: Your welcome!


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Learn More About Upgrading

Deep Dive Webinar: Boost C++Builder Compile Speed with TwineCompile
Related posts
C++

What's New in the GetIt Package Manager - June 2020

C++

RAD Studio 10.4 Now Available, Learn More

C++NewsRAD Studio

Open for Business with 10.4! - May 2020 GM Update

C++DelphiNews

Embarcadero Open Source Project Sponsorship

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES