1
0
mirror of https://github.com/JKorf/CryptoExchange.Net synced 2025-06-08 16:36:15 +00:00

Revert "Added a flexible way to write in request body"

This reverts commit 9030ffd333fc6c867b6397c3893f0f9286404363.
This commit is contained in:
Noé Comte 2018-08-02 14:48:36 +02:00
parent 9030ffd333
commit 91fb08f75d
3 changed files with 0 additions and 21 deletions

View File

@ -143,7 +143,6 @@ namespace CryptoExchange.Net
var request = RequestFactory.Create(uriString);
request.Method = method;
request.Parameters = parameters;
if (authProvider != null)
request = authProvider.AddAuthenticationToRequest(request, signed);
@ -156,15 +155,6 @@ namespace CryptoExchange.Net
var returnedData = "";
try
{
if (request.WriteCustomBody &&
request.CustomBody != null && request.CustomBody.Length > 0)
{
using (var requestStream = await request.GetRequestStream())
{
requestStream.Write(request.CustomBody, 0, request.CustomBody.Length);
}
}
var response = await request.GetResponse().ConfigureAwait(false);
using (var reader = new StreamReader(response.GetResponseStream()))
{

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading.Tasks;
@ -11,10 +10,6 @@ namespace CryptoExchange.Net.Interfaces
Uri Uri { get; }
WebHeaderCollection Headers { get; set; }
string Method { get; set; }
Dictionary<string, object> Parameters { get; set; }
byte[] CustomBody { get; set; }
bool WriteCustomBody { get; set; }
void SetProxy(string host, int port);

View File

@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Threading.Tasks;
@ -45,11 +44,6 @@ namespace CryptoExchange.Net.Requests
set => request.Method = value;
}
public Dictionary<string, object> Parameters { get; set; }
public byte[] CustomBody { get; set; }
public bool WriteCustomBody { get; set; } = false;
public Uri Uri => request.RequestUri;
public void SetProxy(string host, int port)