/// <summary> /// /// </summary> /// <param name="key"></param> /// <param name="value"></param> /// <param name="encoding"></param> internal EncodedParameter(string key, object value, ParameterEncoding encoding) : this(key, value) { Encoding = encoding; }
/// <summary> /// Adds a parameter to the body of the request, to be encoded with the specified format. /// </summary> /// <param name="key"></param> /// <param name="value"> /// For ByteArrays or Base64, this needs to be a Stream, or an exception will be thrown when the request is executed. /// </param> /// <param name="encoding"></param> /// <remarks>Note: If the ContentType is anything other than UrlFormEncoded, only the first Parameter will be serialzed to the request body.</remarks> public void AddParameter(string key, object value, ParameterEncoding encoding = ParameterEncoding.UriEncoded) { Parameters.Add(new EncodedParameter(key, value, encoding)); }
/// <summary> /// /// </summary> /// <param name="key"></param> /// <param name="value"></param> internal EncodedParameter(string key, object value) { Key = key; Value = value; Encoding = ParameterEncoding.UriEncoded; }