Esempio n. 1
0
        public async Task<HttpResponseMessage> Twilio(TwilioSmsRequest model)
        {
            var body = model.Body.ExtractAlphaNumericSpace();
            if (string.IsNullOrWhiteSpace(body))
            {
                throw new HttpResponseException(HttpStatusCode.BadRequest);
            }

            IEnumerable<string> respondMessages = null;

            switch (body.Trim().ToLowerInvariant())
            {
                case "register":
                    respondMessages = await this.Register(model);
                    break;
            }

            if (respondMessages == null)
            {
                return new HttpResponseMessage(HttpStatusCode.BadRequest);
            }

            return this.CreateTwilioResponse(respondMessages);
        }
Esempio n. 2
0
 private Task<IEnumerable<string>> Register(TwilioSmsRequest model)
 {
     return null;
 }