Extend CapsClient to handle other http methods. I'm considering just rewriting this whole class.

This commit is contained in:
Cinder
2021-09-24 11:26:29 -05:00
parent 28b3c772fd
commit aa980fc7ee
20 changed files with 216 additions and 79 deletions

View File

@@ -73,7 +73,7 @@ namespace OpenMetaverse.Http
byte[] postData = OSDParser.SerializeLLSDXmlBytes(request);
_Request = CapsBase.UploadDataAsync(_Address, null, REQUEST_CONTENT_TYPE, postData, REQUEST_TIMEOUT, OpenWriteHandler, null, RequestCompletedHandler);
_Request = CapsBase.PostDataAsync(_Address, null, REQUEST_CONTENT_TYPE, postData, REQUEST_TIMEOUT, OpenWriteHandler, null, RequestCompletedHandler);
}
public void Stop(bool immediate)
@@ -211,7 +211,7 @@ namespace OpenMetaverse.Http
// Resume the connection. The event handler for the connection opening
// just sets class _Request variable to the current HttpWebRequest
CapsBase.UploadDataAsync(_Address, null, REQUEST_CONTENT_TYPE, postData, REQUEST_TIMEOUT,
CapsBase.PostDataAsync(_Address, null, REQUEST_CONTENT_TYPE, postData, REQUEST_TIMEOUT,
delegate(HttpWebRequest newRequest) { _Request = newRequest; }, null, RequestCompletedHandler);
// If the event queue is dead at this point, turn it off since