UnityWebRequestExt.ReadText Method

Reads a string asynchronously from an URI.

Namespace: UltimateXR.Extensions.Unity.IO
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Task<string> ReadText(
	string uri,
	CancellationToken ct = default
)


Parameters

 

uri
Type: System.String
Text location
ct (Optional)
Type: System.Threading.CancellationToken
Optional cancellation, to cancel the operation

Return Value

Type: Task(String)
Awaitable task that returns the string read

Exceptions

ExceptionCondition
OperationCanceledExceptionThe task was canceled using ct
HttpUwrExceptionHttpError flag is on
NetUwrExceptionNetworkError flag is on

See Also

Reference

UnityWebRequestExt Class
UltimateXR.Extensions.Unity.IO Namespace