안녕하세요
닷넷에서 httpclient를 이용해서 호출하면 404 오류가 발생합니다. 어떻게 해야하나요?
Postman에서 호출시에는 정상적으로 requestKey가 반환되며, StringContent에 ""를 입력하고 호출해도 동일한 오류가 발생합니다. 닷넷에서 호출하는 방법이 어떻게되는지 문의 드립니다.
reason : Not Found
statecode : 404
Json : {“bapp”:{“name”:“Test”},“type”:“auth”}
private async void OnKlipAuth()
{
var httpClient = new HttpClient();
var requestContent = new KlipRequest
{
BApp = new KlipBApp
{
Name = "Test",
},
Type = "auth"
};
var requestJson = JsonConvert.SerializeObject(requestContent, new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
});
var content = new StringContent(requestJson, Encoding.UTF8, "application/json");
var result = await httpClient.PostAsync("https://a2a-api.klipwallet.com/v2/a2a/prepare", content);
if (result != null)
{
}
}