Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get json data with headers? #45

Open
mightymouse2045 opened this issue Dec 27, 2017 · 2 comments
Open

How to get json data with headers? #45

mightymouse2045 opened this issue Dec 27, 2017 · 2 comments

Comments

@mightymouse2045
Copy link

Hi I am trying to get the headers returned with the functions. So GetMarkets returns headers as below, I have edited bittrex.go and added a line under the unmarshal in GetMarkets function fmt.printf("%+v", &markets) but it returns the data twice as below:

[{MarketCurrency:LTC BaseCurrency:BTC MarketCurrencyLong:Litecoin BaseCurrencyLong:Bitcoin MinTradeSize:0.02663019 MarketName:BTC-LTC IsActive:true Created:2014-02-13T00:00:00 Notice: IsSponsored:false LogoUrl:https://bittrexblobstorage.blob.core.windows.net/public/6defbc41-582d-47a6-bb2e-d0fa88663524.png},<nil>]
[{LTC BTC Litecoin Bitcoin 0.02663019 BTC-LTC true 2014-02-13T00:00:00 false https://bittrexblobstorage.blob.core.windows.net/public/6defbc41-582d-47a6-bb2e-d0fa88663524.png}]`

Can you help me out I am only new to go?

@mightymouse2045 mightymouse2045 changed the title How to jsom with headers How to get json data with headers? Dec 28, 2017
@toorop
Copy link
Owner

toorop commented Dec 28, 2017

Hi, by "headers" you mean HTTP headers ?

@mightymouse2045
Copy link
Author

Hi Toorop, no sorry I meant the json headers eg: MarketCurrency:, BaseCurrency: etc the ones out of the struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants