So, i forked this extension 31 oct. 2017, and made small changes.
- Fixed segfault
- Added timeout connection and waiting response, "Follow location" settings in HTTPClient methodmap.
- IChangeableForward removed, now extension uses IPluginFunction.
- Callback modified: added ability for receive error string.
Code:
public void OnRequestFinished(HTTPResponse hResponse, any iData, const char[] szError) {
if (szError[0] != 0) {
LogError("Error received when processing request: %s", szError);
return;
}
// handle response...
}
But you can still use this old function prototype, without receiving error message:
Code:
public void OnRequestFinished(HTTPResponse hResponse, any iData) {
// handle response...
}
But in this case, you should add check:
Code:
if (hResponse != null)
You can see source code
here. Download binaries
here.
__________________