mirror of
https://github.com/ysoftdevs/wapifuzz.git
synced 2026-03-14 06:15:48 +01:00
Init WFuzz state
This commit is contained in:
43
parser/Models/Request.cs
Normal file
43
parser/Models/Request.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Models
|
||||
{
|
||||
public class Request
|
||||
{
|
||||
public string Method { get; }
|
||||
public string Summary { get; set; }
|
||||
public List<UriAttribute> UriAttributes { get; set; }
|
||||
public List<Response> Responses { get; set; }
|
||||
public string BodyExample { get; set; }
|
||||
|
||||
public Dictionary<string, object> BodySchema { get; set; }
|
||||
|
||||
public Request(string method)
|
||||
{
|
||||
Method = method;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append("Type: ");
|
||||
builder.AppendLine(Method);
|
||||
builder.Append("Summary: ");
|
||||
builder.AppendLine(Summary);
|
||||
builder.AppendLine("Uri Attributes: ");
|
||||
foreach (var attribute in UriAttributes)
|
||||
{
|
||||
builder.AppendLine(attribute.ToString());
|
||||
}
|
||||
builder.AppendLine("Responses: ");
|
||||
foreach (var response in Responses)
|
||||
{
|
||||
builder.AppendLine(response.ToString());
|
||||
}
|
||||
builder.Append("BodyExample: ");
|
||||
builder.AppendLine(BodyExample);
|
||||
return builder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user