title: How do I modify this hitbtc code so I can use post too instead of get?
body: <p>I managed to create hitbtc api caller</p>
  
  <pre><code>Protected Overrides Function getJsonPrivate(method As String, otherParameters() As Tuple(Of String, String)) As String
      Dim content = "/api/1/trading/" + method + "?nonce=" + ExchangesClass.getNonce().ToString + "&amp;apikey=" + _apiKey1
      Dim postar = otherParameters.ToList.ConvertAll(Function(x) x.Item1 + "=" + x.Item2)
      Dim post = String.Join("&amp;", postar) ' "id=4987469178"
      Dim sighash = computeSig(content) '"https://api.hitbtc.com/api/1/trading/cancel_order?nonce=36411402&amp;apikey=13a2492a3f0631d657ecd510ceacc509"
      Dim url = "https://api.hitbtc.com" + content
      Dim response = CookieAwareWebClient.downloadString1(url, post, {Tuple.Create("X-Signature", sighash)})
      'Dim response1 = CookieAwareWebClient.downloadString1("https://api.hitbtc.com" + content + "&amp;" + post, "", {Tuple.Create("X-Signature", sighash)})
  
      Return response
  End Function
  </code></pre>
  
  <p>It works for their get requests. I can get balances. I can get active orders. But to cancel orders, for example, I would need post requests.</p>
  
  <p>For example, doing
          _jsonResult = getJsonPrivate("balance", {})</p>
  
  <p>would work just fine and I would get:</p>
  
  <pre><code>"{""balance"":[{""currency_code"":""1ST"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""8BT"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""ADX"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""AE"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""AEON"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""AIR"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""AMB"",""cash"":""0"",""reserved"":""0""},{""currency_code"":""AMP"",""cash"":""0"",""reserved"":""0""},
  </code></pre>
  
  <p>response simply result in zero.</p>
  
  <p>I tried to see PhP code sample here</p>
  
  <p><a href="https://github.com/hitbtc-com/hitbtc-api/blob/master/APIv1.md#examples" rel="nofollow noreferrer">https://github.com/hitbtc-com/hitbtc-api/blob/master/APIv1.md#examples</a></p>
  
  <p>And the PHP sample here</p>
  
  <p><a href="https://gist.github.com/hitbtc-com/10885873" rel="nofollow noreferrer">https://gist.github.com/hitbtc-com/10885873</a></p>
  
  <p>It's still strange.</p>
  
  <p>Am I supposed to computeSig based on the post requests too added to URI? With no underlying &amp;</p>
  
  <p>Has anyone C# or vb.net sample? I think it'll require only one small change to the code so I can do cancel_order method instead of just get</p>
  
  <p>The content of downloadstring1 is the following. So it basically do post or get based on whether post argument is empty string or not. I think that's pretty obvious.</p>
  
  <pre><code>Public Shared Function downloadString1(url As String, post As String, otherHeaders As Tuple(Of String, String)()) As String
          Dim wc = New CookieAwareWebClient()
          For Each oh In otherHeaders
              wc.Headers.Add(oh.Item1, oh.Item2)
          Next
  
          Dim response = String.Empty
  
          Try
              If post = "" Then
                  response = wc.DownloadString(url)
              Else
                  response = wc.UploadString(url, post)
              End If
          Catch ex As Exception
              Dim a = 1
          End Try
  
          Return response
      End Function
  </code></pre>