ApiClientPost Method

Performs an unauthenticated POST HTTP request using HttpWebRequest to the specified url.

Definition

Namespace: SMath.Manager.Network
Assembly: SMath.Manager (in SMath.Manager.dll) Version: 1.2.9018.0
C#
public static bool Post(
	string url,
	Stream outputStream,
	string authorizationValue,
	NameValueCollection fields,
	out HttpStatusCode? status,
	string accept = "application/json",
	int maxTimeout = 10000,
	string userAgent = null
)

Parameters

url  String
Url to perform request to.
outputStream  Stream
Output stream.
authorizationValue  String
JWT authorization token. Unathenticated request is performed if parameter is empty.
fields  NameValueCollection
Data fields to send via HTTP request.
status  NullableHttpStatusCode
Status code returned by the server.
accept  String  (Optional)
Accept type of the request.
maxTimeout  Int32  (Optional)
Maximum request timeout to wait for.
userAgent  String  (Optional)
User agent string.

Return Value

Boolean
Returns true if the POST HTTP request performed successfully.

See Also