Skip to content

System.Net.HttpWebRequest cannot be used in Wasm. #30

Closed

Description

@xsteel2003

Because I need to get data from a Web server, it seems that many of the System.Net namespaces cannot be used in Wasm, such as System.Net.WebClient. (All code in UWP works)

Activity

  1. jeromelaban commented on Jun 12, 2018

    @jeromelaban
    Member

    Thanks for your interest, you can use this to make HTTP calls: https://github.com/nventive/Uno.Playground/blob/80322aec3d759d009f6a900bca4a07bc63ae6a62/Uno.UI.Demo.Shared/Samples/Playground.xaml.cs#L487

    You have to inject it at all call sites, since the BCL does not allow for changing it globally.

  2. xsteel2003 commented on Jun 12, 2018

    @xsteel2003
    Author

    Thank you very much, the CreateHttp() code works!

  3. jeromelaban commented on Jun 12, 2018

    @jeromelaban
    Member

    Excellent, thanks !

  4. added a commit that references this issue on Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions