Base64encoding request body

0 Answers 105 Views
Fiddler Classic
D
Top achievements
Rank 1
D asked on 17 Oct 2022, 07:34 AM

Hi,

I tried

static function OnBeforeRequest(oSession: Session) {
var arr: Byte[] = oSession.requestBodyBytes;
var istr: String = '';
istr =  Convert.ToBase64String(arr);

// ... do something with request body ...

oSession.RequestHeaders['Fiddler-Encoding'] = 'base64';
oSession.utilSetRequestBody(istr);
}

base on this article. Unfortunately this does not work. Any help appreciated.

Nick Iliev
Telerik team
commented on 18 Oct 2022, 05:47 AM

Elaborate more on what's not working - is your conversion to base64 successful in the first place (it might fail for reasons like a large file, unknown or wrongly formatted input, etc.)?

 

D
Top achievements
Rank 1
commented on 18 Oct 2022, 06:14 AM | edited

Setting the request body does not work. It's not a large file (it's a MAPI/HTTP conversation).


08:13:10:9769 0,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,228,4,0,0,9,4,0,0,9,4,0,0,0,0,0,0 Bytes
08:13:10:9769 AAAAAP8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADkBAAACQQAAAkEAAAAAAAA B64

 

No answers yet. Maybe you can help?

Tags
Fiddler Classic
Asked by
D
Top achievements
Rank 1
Share this question
or