/// <summary>
 /// <para> Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the</para>
 /// <para> handle is invalid.</para>
 /// </summary>
 public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_GetHTTPResponseBodySize(CSteamAPIContext.GetSteamHTTP(), hRequest, out unBodySize));
 }
 /// <summary>
 /// <para> Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the</para>
 /// <para> handle is invalid or is to a streaming response, or if the provided buffer is not the correct size.  Use BGetHTTPResponseBodySize first to find out</para>
 /// <para> the correct buffer size to use.</para>
 /// </summary>
 public static bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, byte[] pBodyDataBuffer, uint unBufferSize)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_GetHTTPResponseBodyData(CSteamAPIContext.GetSteamHTTP(), hRequest, pBodyDataBuffer, unBufferSize));
 }
Пример #3
0
 /// <summary>
 /// <para> Sends the HTTP request, will return false on a bad handle, otherwise use SteamCallHandle to wait on</para>
 /// <para> asynchronous response via callback for completion, and listen for HTTPRequestHeadersReceived_t and</para>
 /// <para> HTTPRequestDataReceived_t callbacks while streaming.</para>
 /// </summary>
 public static bool SendHTTPRequestAndStreamResponse(HTTPRequestHandle hRequest, out SteamAPICall_t pCallHandle)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SendHTTPRequestAndStreamResponse(CSteamAPIContext.GetSteamHTTP(), hRequest, out pCallHandle));
 }
 /// <summary>
 /// <para> Prioritizes a request you have sent, the actual HTTP client code may have many requests queued, and this will move</para>
 /// <para> the specified request to the head of the queue.  Returns false on invalid handle, or if the request is not yet sent.</para>
 /// </summary>
 public static bool PrioritizeHTTPRequest(HTTPRequestHandle hRequest)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_PrioritizeHTTPRequest(CSteamAPIContext.GetSteamHTTP(), hRequest));
 }
Пример #5
0
 /// <summary>
 /// <para> Set a context value for the request, which will be returned in the HTTPRequestCompleted_t callback after</para>
 /// <para> sending the request.  This is just so the caller can easily keep track of which callbacks go with which request data.</para>
 /// </summary>
 public static bool SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SetHTTPRequestContextValue(CSteamAPIContext.GetSteamHTTP(), hRequest, ulContextValue));
 }
Пример #6
0
 /// <summary>
 /// <para> Set a timeout in seconds for the HTTP request, must be called prior to sending the request.  Default</para>
 /// <para> timeout is 60 seconds if you don't call this.  Returns false if the handle is invalid, or the request</para>
 /// <para> has already been sent.</para>
 /// </summary>
 public static bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint unTimeoutSeconds)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SetHTTPRequestNetworkActivityTimeout(CSteamAPIContext.GetSteamHTTP(), hRequest, unTimeoutSeconds));
 }
Пример #7
0
 /// <summary>
 /// <para> Set an absolute timeout on the HTTP request, this is just a total time timeout different than the network activity timeout</para>
 /// <para> which can bump everytime we get more data</para>
 /// </summary>
 public static bool SetHTTPRequestAbsoluteTimeoutMS(HTTPRequestHandle hRequest, uint unMilliseconds)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS(CSteamAPIContext.GetSteamHTTP(), hRequest, unMilliseconds));
 }
Пример #8
0
 /// <summary>
 /// <para> Check if the reason the request failed was because we timed it out (rather than some harder failure)</para>
 /// </summary>
 public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_GetHTTPRequestWasTimedOut(CSteamAPIContext.GetSteamHTTP(), hRequest, out pbWasTimedOut));
 }
Пример #9
0
 /// <summary>
 /// <para> Disable or re-enable verification of SSL/TLS certificates.</para>
 /// <para> By default, certificates are checked for all HTTPS requests.</para>
 /// </summary>
 public static bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate(CSteamAPIContext.GetSteamHTTP(), hRequest, bRequireVerifiedCertificate));
 }
Пример #10
0
 /// <summary>
 /// <para> Set the cookie container to use for a HTTP request</para>
 /// </summary>
 public static bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_SetHTTPRequestCookieContainer(CSteamAPIContext.GetSteamHTTP(), hRequest, hCookieContainer));
 }
Пример #11
0
 /// <summary>
 /// <para> Release a cookie container you are finished using, freeing it's memory</para>
 /// </summary>
 public static bool ReleaseCookieContainer(HTTPCookieContainerHandle hCookieContainer)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_ReleaseCookieContainer(CSteamAPIContext.GetSteamHTTP(), hCookieContainer));
 }
Пример #12
0
 /// <summary>
 /// <para> Creates a cookie container handle which you must later free with ReleaseCookieContainer().  If bAllowResponsesToModify=true</para>
 /// <para> than any response to your requests using this cookie container may add new cookies which may be transmitted with</para>
 /// <para> future requests.  If bAllowResponsesToModify=false than only cookies you explicitly set will be sent.  This API is just for</para>
 /// <para> during process lifetime, after steam restarts no cookies are persisted and you have no way to access the cookie container across</para>
 /// <para> repeat executions of your process.</para>
 /// </summary>
 public static HTTPCookieContainerHandle CreateCookieContainer(bool bAllowResponsesToModify)
 {
     InteropHelp.TestIfAvailableClient();
     return((HTTPCookieContainerHandle)NativeMethods.ISteamHTTP_CreateCookieContainer(CSteamAPIContext.GetSteamHTTP(), bAllowResponsesToModify));
 }
Пример #13
0
 /// <summary>
 /// <para> Gets progress on downloading the body for the request.  This will be zero unless a response header has already been</para>
 /// <para> received which included a content-length field.  For responses that contain no content-length it will report</para>
 /// <para> zero for the duration of the request as the size is unknown until the connection closes.</para>
 /// </summary>
 public static bool GetHTTPDownloadProgressPct(HTTPRequestHandle hRequest, out float pflPercentOut)
 {
     InteropHelp.TestIfAvailableClient();
     return(NativeMethods.ISteamHTTP_GetHTTPDownloadProgressPct(CSteamAPIContext.GetSteamHTTP(), hRequest, out pflPercentOut));
 }