I am building a wcf rest service to upload a file
[WebInvoke(Method = "POST", UriTemplate = "upload?fileName={fileName}&filePath={filePath}&replace={replace}")]
void UploadFile(Stream fileContent, string fileName, string filePath, bool replace);
Here I need to make filePath & replace parameter as optional. I can not simply rely on null check i.e. filePath = filePath ?? "" inside method if consumer doesn't pass the value for the parameter because first of all consumer doesn't know whether the parameters are required or optional. any help?