public IActionResult Post(string accessToken) { if (!IsValidToken(accessToken)) { return(StatusCode((int)HttpStatusCode.MethodNotAllowed)); } if (string.IsNullOrWhiteSpace(Request.ContentType)) { throw new NotSupportedException(); } try { _writer.Write(Request, _model); return(Ok()); } catch (Exception ew) { _logger.LogError(ew.ToString()); throw ew; } }
public void Replay(IHttpWriter writer) { writer.Write(stream => { lock (_locker) { _stream.Position = 0; _stream.CopyTo(stream); } }); }
public void Replay(IHttpWriter writer) { writer.Write(stream => { lock (_locker) { _stream.Position = 0; _stream.CopyTo(stream); } }); }
public void Replay(IHttpWriter writer) { writer.Write(_text); }
public void Write(string contentType, string renderedOutput) { _writer.WriteContentType(contentType); _writer.Write(renderedOutput); }
public void Replay(IHttpWriter writer) { writer.Write(_text); }
public void Execute(SwaggerUIRequest request) { _writer.Write(_cache.Get().PageContents); }