Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Pre After Request actions and debugging information

Tobias Klika edited this page Jul 2, 2018 · 1 revision

The PocketClient can call a user defined action before and after every request:

Pocket.PreRequest = (endpoint =>
{
  Debug.WriteLine("Request on endpoint: " + endpoint);
  // do whatever you want here
});
Pocket.AfterRequest = (responseString =>
{
  Debug.WriteLine("Raw JSON response is: " + responseString);
});

Debugging information

If you want to get the last response headers and body you can read the public properties lastHeaders and lastResponseData.

Clone this wiki locally