From 08ccf0fbbf7469c3fa8d6f5bec488d5b4c4c5cba Mon Sep 17 00:00:00 2001 From: Bhumit Attarde Date: Tue, 4 Jul 2023 09:33:44 +0530 Subject: [PATCH] fix: instrument getting parsed as json (#64) --- include/kitepp/kite.hpp | 6 +++--- include/kitepp/kite/internal.hpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/kitepp/kite.hpp b/include/kitepp/kite.hpp index f56423a..10ccfec 100644 --- a/include/kitepp/kite.hpp +++ b/include/kitepp/kite.hpp @@ -651,7 +651,7 @@ class kite { { "mf.holdings", { utils::http::METHOD::GET, "/mf/holdings" } }, { "mf.instruments", { utils::http::METHOD::GET, "/mf/instruments", utils::http::CONTENT_TYPE::NON_JSON, - utils::http::CONTENT_TYPE::JSON } }, + utils::http::CONTENT_TYPE::NON_JSON } }, { "mf.sips", { utils::http::METHOD::GET, "/mf/sips" } }, { "mf.sip.info", { utils::http::METHOD::GET, "/mf/sips/{0}" } }, { "mf.sip.place", { utils::http::METHOD::POST, "/mf/sips" } }, @@ -667,10 +667,10 @@ class kite { // market endpoints { "market.instruments.all", { utils::http::METHOD::GET, "/instruments", utils::http::CONTENT_TYPE::NON_JSON, - utils::http::CONTENT_TYPE::JSON } }, + utils::http::CONTENT_TYPE::NON_JSON } }, { "market.instruments", { utils::http::METHOD::GET, "/instruments/{0}", utils::http::CONTENT_TYPE::NON_JSON, - utils::http::CONTENT_TYPE::JSON } }, + utils::http::CONTENT_TYPE::NON_JSON } }, { "market.margins", { utils::http::METHOD::GET, "/margins/{0}" } }, { "market.historical", { utils::http::METHOD::GET, diff --git a/include/kitepp/kite/internal.hpp b/include/kitepp/kite/internal.hpp index a374802..3c1e19a 100644 --- a/include/kitepp/kite/internal.hpp +++ b/include/kitepp/kite/internal.hpp @@ -68,7 +68,7 @@ inline utils::http::response kite::sendReq( .send(client); } return utils::http::request { endpoint.method, endpoint.Path(fmtArgs), - getAuth(), body, endpoint.contentType } + getAuth(), body, endpoint.contentType, endpoint.responseType } .send(client); };