WPF application with rest requests and proxy concerns

Vidar 1 Reputation point
2021-02-04T15:53:50.543+00:00

Note - this question is not specifically about WFP - but the problem presents itself within a WPF application.

I am writing a WPF app for Windows - C#. It will do some Rest requests to a server I have publicly available.

This application will be delivered to external clients.Do I have to consider proxy implications from their side when they are running my application?

If so I don't find that much info out there about designing your code around this issue. I am worried that I am over complicating the issue by using things like HttpClient and HttpClientHandler etc. and then having to wrap all this stuff with a UI and further complicate my application.

What should my approach be, and does anyone know of any good online tutorial that can explain this stuff simply.

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,358 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Duane Arnold 3,216 Reputation points
    2021-02-04T22:11:33.323+00:00

    This application will be delivered to external clients. Do I have to consider proxy implications from their side when they are running my application?

    I would think that the client machine's network behind a firewall will it allow outgoing traffic to make outside contact with an external resource would be the consideration.

    If so I don't find that much info out there about designing your code around this issue. I am worried that I am over complicating the issue by using things like HttpClient and HttpClientHandler etc. and then having to wrap all this stuff with a UI and further complicate my application.

    Well in order to make contact with a Restful service, you are going to have to use HttpClient there is no coming around it.

    You should try to implement some kind of SoC, like a Service Layer that holds code for the HTTPClint requests called upon by the UI.

    https://en.wikipedia.org/wiki/Separation_of_concerns

    1 person found this answer helpful.
    0 comments No comments