Are macOS Web Proxy settings ignored by HTTPSocket?

Hello, this is my first time posting in the forums.

I’m currently reading through the “Introduction to Programming with Xojo” 3rd Edition book and doing all the lessons.

In chapter 11.4 “Web Connections”. I built the “HTTPStuff” Desktop app on macOS and the App perform as expected.

But I didn’t immediately see the HTTP request and response in my Web Debugging tool (Fiddler, on my local Windows development machine), even though I have my Web Proxy settings already configured in the Network Preferences of my Mac.

Normally I can see all HTTP/S traffic in Fiddler from Safari, Firefox, Chrome and the mac OS as well as other systems running on my Mac.

To see the HTTP traffic for the “Web Connections” App, I had to add the following code to the PushButton1.Action() event, like the following:

MyWebSocket.HTTPProxyAddress = "" ' I added this line
MyWebSocket.HTTPProxyPort = 8888 ' I added this line too
MyWebSocket.Get(TextField1.Text) ' from the book

My question is, is the HTTPSocket class designed to purposely ignore the local OS proxy settings?

I’m just wondering if I have to build in proxy routing logic for all my Desktop apps in future, for testing or runtime purposes. Or am I missing something that I haven’t learned yet?

Note: I have a Xojo Pro license, using Xojo 2017 r2.1 on macOS 10.12.6.

Some additional info about me, for those that are interested. My career background is ASP.NET and SQL Server programming. I primarily build custom single-page business web applications (cross-browser), with lots of remote scripting via either my own custom JS libraries or jQuery to do XML-over-HTTP or Ajax/Json requests. So I rely heavily on monitoring all my browser, web services, Web API and Server traffic to know exactly what is being passed back-and-forth at all times. I leave Fiddler running all day during development and testing.

Now I want to build some Desktop apps using Xojo to interact with my .NET Server applications. Xojo is pretty cool and I’m excited at learning more.

Thank you.

HTTPSocket from the classic framework will not use the system proxy settings, and must be manually configured to use a proxy. Xojo.Net.HTTPSocket in the new framework will use system proxy settings. :slight_smile:

Thank you very much Tim, that did it.

And I’m glad I asked, because it hadn’t occurred to me until now, that when I’m looking at older code examples (like those installed with Xojo or in older posts on the forum), if I try to implement them - I should first look if an equivalent object or function exists in the newer Xojo Framework.

Interestingly, the Xojo.Net.HTTPSocket object even automatically handled a 302 redirect to return the final target page. This redirect was not obvious or apparent to the PageReceived() event (without purposely comparing the original URL and the final URL parameter of PageReceived()), but I could see it in Fiddler. This is one of the reasons why using a Web Debugger is so helpful to me.

Thanks again!