Example #1
0
 //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;
 }
Example #2
0
 void InitiateParameters()
 {
     this.query   = new QueryParameters(this);
     this.body    = new BodyParameters(this);
     this.cookie  = new CookieParameters(this);
     this.headers = new RequestHeaderParameters(this);
 }
Example #3
0
 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;
 }
Example #4
0
        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);
        }
Example #5
0
 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;
 }
Example #6
0
 //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;
 }
Example #7
0
 void InitiateParameters()
 {
     this.query = new QueryParameters(this);
     this.body = new BodyParameters(this);
     this.cookie = new CookieParameters(this);
     this.headers = new RequestHeaderParameters(this);
 }