Class NetworkPostRequest
A base class for data request posting data over network.
public abstract class NetworkPostRequest : IRequest
Inheritance
Derived
Implements
Remarks
Create a subclass that inherits from NetworkPostRequest to send your own data.
Constructors
NetworkPostRequest()
Initializes a new instance of the NetworkPostRequest class using configuration from project settings.
public NetworkPostRequest()
NetworkPostRequest(string, int, int)
Initializes a new instance of the NetworkPostRequest class with custom parameters.
public NetworkPostRequest(string baseURL, int timeOut = 12, int retryCount = 5)
Parameters
| Name | Type | Description |
|---|---|---|
baseURL | string | The server URL to send the POST request to. |
timeOut | int | The timeout duration (in seconds) for the request. |
retryCount | int | The number of retry attempts on failure. |
Methods
CreateMultipartFormData()
Creates the multipart form data for a POST request using UnityWebRequest.
protected virtual List<IMultipartFormSection> CreateMultipartFormData()
Returns
List<IMultipartFormSection> — A list of IMultipartFormSection representing the form data to be sent.
Remarks
This base implementation includes only the user ID.
To send additional data, override this method in a derived class.