1

I'm using Titanium Web proxy to monitor requests and responses but I can't find out how get the payload data of requests. Here is my function that takes the request object and pulls the data I need from it.

    public async Task OnRequest(object sender, SessionEventArgs e)
    {
        string requestBodySent = e.HttpClient.Request.HasBody ? e.HttpClient.Request.BodyString : null;
        CustomRequests requestSent = new CustomRequests(e.HttpClient.Request.Method, e.HttpClient.Request.HeaderText, requestBodySent, e.HttpClient.Request.RequestUri);

        requestHistory.Add(requestSent);
    }

I'm able to pull and save the body, method type, headers, and url but I don't know how to get the payload data being sent out like when I'm logging into an account and submit the login form. Any and all help is appreciated, Thanks.

1 Answer 1

0

In order to get the payload you should await it

var body = await e.GetRequestBodyAsString();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.