This is a migrated thread and some comments may be shown as answers.

fiddler response modification.

1 Answer 324 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Rocky
Top achievements
Rank 1
Rocky asked on 25 Aug 2017, 02:06 PM

Hello

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.

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 31 Aug 2017, 06:09 AM
Hi,

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.

Regards,
Alexander
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
Tags
Windows
Asked by
Rocky
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or