REST API Integration

0
0

I need to integrate REST API on my WISEJ app.

Can you help me?

It’s a little bit urgent and I never work with REST API.

 

Thank’s

  • You must to post comments
0
0

 

We are using WiseJ 3.1.10, however when we try to HttpClient in visual studio vb.net we get Type ‘Http.HttpClient’ is not defined (see screenshot).

Our production servers are Linux using the net7.0 framework.

As of right now when we can’t run our application in development mode and call an API.

We even tried switching between frameworks in the editor, see screenshot 2.

How can we make a web request in development mode?

  • Alaa (ITG)
    Hi Chad, System.Net is not available for .NET Framework 4.8, that file has to be available only for .NET Core, what you can do is have 2 separate files, one for .NET 48 that uses System.Web, and another one for .NET Core that uses System.Net and use conditional compilation by specifying the files in the .csproj file. It’s the easiest way to deal with this kind of issues if you have to use .NET 48.
  • Chad Miller
    Thank you, issue resolved.
  • Chad Miller
    Actually, not exactly solved. Since we do not deploy to the “net48: framework we changed then “target framework” value in project properties from “net48;net6.0” to “net6.0”. This caused the issue to resolve, however now we can’t open our pages in design mode.
  • Chad Miller
    We implemented as you first stated, and everything now works as expected.
  • You must to post comments
0
0

Hi Antonio,

At it’s simplest it would be something like this:

HttpClient httpClient = new HttpClient();
var result = httpClient.GetAsync("https://www.google.com").Result;

For more information check out these links:

https://stackoverflow.com/questions/37462135/how-make-an-http-request-in-c-sharp

 https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient?redirectedfrom=MSDN&view=netframework-4.8

Depending on what you’re trying to do, there might be different solutions. If you let me know what you’re trying to accomplish we can look into them!

Best regards,

Levie

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.