Skip to content

extansion #11381

Open
Open
extansion#11381
@SaaSCh

Description

@SaaSCh

Type of issue

Other (describe below)

Description

[Hier Feedback eingeben]
using System;
using System.IO;
using System.Net;
using System.Text;

namespace Examples.System.Net
{
public class WebRequestGetExample
{
public static void Main ()
{
// Create a request for the URL.
WebRequest request = WebRequest.Create ("http://www.contoso.com/default.html");
// If required by the server, set the credentials.
request.Credentials = CredentialCache.DefaultCredentials;
// Get the response.
HttpWebResponse response = (HttpWebResponse)request.GetResponse ();
// Display the status.
Console.WriteLine (response.StatusDescription);
// Get the stream containing content returned by the server.
Stream dataStream = response.GetResponseStream ();
// Open the stream using a StreamReader for easy access.
StreamReader reader = new StreamReader (dataStream);
// Read the content.
string responseFromServer = reader.ReadToEnd ();
// Display the content.
Console.WriteLine (responseFromServer);
// Cleanup the streams and the response.
reader.Close ();
dataStream.Close ();
response.Close ();
}
}
}

Page URL

https://learn.microsoft.com/de-de/dotnet/api/system.threading.tasks.valuetask-1.isfaulted?view=net-9.0#system-threading-tasks-valuetask-1-isfaulted

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading.Tasks/ValueTask`1.xml

Document Version Independent Id

5aeebf7d-dd40-1afc-965f-13cbfa2cf26e

Platform Id

0e3671cd-d6a5-63b2-f861-ad3cc1a27f95

Article author

octa

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersneeds-more-infountriagedNew issue has not been triaged by the area owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions