Version: Unity 6 (6000.0)
LanguageEnglish
  • C#

UnityWebRequest.Abort

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void Abort();

Description

If in progress, halts the UnityWebRequest as soon as possible.

This method may be called at any time. If the UnityWebRequest has not already completed, the UnityWebRequest will halt uploading or downloading data as soon as possible. Aborted UnityWebRequests are considered to have encountered a system error. Depending upon the type of error, the result property will return one of the error values: ConnectionError, ProtocolError, or DataProcessingError. The error property will be Request Aborted.

If this method is called prior to calling Send, then the UnityWebRequest will abort immediately after the call to Send.

Calls to this method have no effect after this UnityWebRequest has encountered a different error, or has successfully finished communicating with the remote server.