ApiClientPost Method
Performs an unauthenticated POST HTTP request using
HttpWebRequest to the specified url.
Namespace: SMath.Manager.NetworkAssembly: SMath.Manager (in SMath.Manager.dll) Version: 1.2.9018.0
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
)
Public Shared Function Post (
url As String,
outputStream As Stream,
authorizationValue As String,
fields As NameValueCollection,
<OutAttribute> ByRef status As HttpStatusCode?,
Optional accept As String = "application/json",
Optional maxTimeout As Integer = 10000,
Optional userAgent As String = Nothing
) As Boolean
public:
static bool Post(
String^ url,
Stream^ outputStream,
String^ authorizationValue,
NameValueCollection^ fields,
[OutAttribute] Nullable<HttpStatusCode>% status,
String^ accept = L"application/json",
int maxTimeout = 10000,
String^ userAgent = nullptr
)
static member Post :
url : string *
outputStream : Stream *
authorizationValue : string *
fields : NameValueCollection *
status : Nullable<HttpStatusCode> byref *
?accept : string *
?maxTimeout : int *
?userAgent : string
(* Defaults:
let _accept = defaultArg accept "application/json"
let _maxTimeout = defaultArg maxTimeout 10000
let _userAgent = defaultArg userAgent null
*)
-> bool
- 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.
BooleanReturns true if the POST HTTP request performed successfully.