//public non-static methods public void SetBody(string BodyString) { this.FreezeBodyString = true; this.SetBodyWithoutUpdatingParameters(BodyString); this.body = new BodyParameters(this, this.bodyString); this.FreezeBodyString = false; }
void InitiateParameters() { this.query = new QueryParameters(this); this.body = new BodyParameters(this); this.cookie = new CookieParameters(this); this.headers = new RequestHeaderParameters(this); }
public void SetBody(byte[] BodyArray) { this.FreezeBodyString = true; if (BodyArray == null) { this.SetEmptyBody(); return; } else if (BodyArray.Length == 0) { this.SetEmptyBody(); return; } this.bodyArray = BodyArray; this.bodyString = this.GetBodyArrayAsString(this.bodyArray); this.body = new BodyParameters(this, this.bodyString); this.headers.Set("Content-Length", this.bodyArray.Length.ToString()); this.FreezeBodyString = false; }
static string GetRequestBodyHighlighting(string ReqBody, string Trigg) { List <string> AllTriggerVariations = new List <string>(); AllTriggerVariations.Add(Trigg); if (!AllTriggerVariations.Contains(BodyParameters.Encode(Trigg))) { AllTriggerVariations.Add(BodyParameters.Encode(Trigg)); } List <string> BodyTriggerVariations = new List <string>(); foreach (string CurrentVariation in AllTriggerVariations) { if (!BodyTriggerVariations.Contains(CurrentVariation) && ReqBody.Contains(CurrentVariation)) { BodyTriggerVariations.Add(CurrentVariation); } } ReqBody = Highlighter.InsertHighlights(ReqBody, BodyTriggerVariations); return(ReqBody); }
public void SetBody(byte[] BodyArray) { this.FreezeBodyString = true; if (BodyArray == null) { this.SetEmptyBody(); return; } else if(BodyArray.Length == 0) { this.SetEmptyBody(); return; } this.bodyArray = BodyArray; this.bodyString = this.GetBodyArrayAsString(this.bodyArray); this.body = new BodyParameters(this, this.bodyString); this.headers.Set("Content-Length", this.bodyArray.Length.ToString()); this.FreezeBodyString = false; }