fiddler response modification.

2 posts, 0 answers
  1. Rocky
    Rocky avatar
    1 posts
    Member since:
    Jun 2013

    Posted 25 Aug 2017 Link to this post


    I been trying to modify response.

    my app send Accept-Encoding: gzip. i am trying to verify if modification break it or not.

    response is ssl base and i am sending request 0x20 byte with POST but i can't break or find option to change buffer at OnBeforeResponse 

    so far i am trying

    var oBody =oSession.responseBodyBytes;

    but i can't find docs or information how to modify body response if its raw data.. there bit lot documents for html and xml modification.

    i want to change response body first or last byte. to see if my application detect change or not.

    Thx in advance.

  2. Alexander
    Alexander avatar
    383 posts

    Posted 31 Aug 2017 Link to this post


    In general in order to modify the response body is to modify the oSession.responseBodyBytes array, so oSession.responseBodyBytes[0] = 234 should do the work.

    Now, in your case you have a gzip encoding, so first you need to do oSession.utilDecodeResponse, modify the byte array and then use oSession.utilGZIPResponse to encode it back. If I understood your question correctly this should do the work.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top