You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
Hi, i am trying to figure this out in C#, since that is the language i am the most used to by far. but this is the first time i am doing http, and jsons in this manner.
to dumb it down to general coding concepts:
i am posting to "http://localhost:8765"
with the string "{"action":"findNotes","version":6,"params":{"cards":"deck:current"}}"
and the response i am getting is "AnkiConnect v.6"
the relevant code lines are:
using HttpClient httpClient = new() { BaseAddress = new Uri("http://localhost:8765"), };
public class Params1
{
public string cards { get; set; }
}
public class GetCards
{
public string action { get; set; }
public int version { get; set; }
public Params1 @params { get; set; }
}
oh using the LoggingHandler in response to the stack overflow link you sent i managed to figure out that what i did wrong was the post as json and such did not take a json as input, as they serialized it themselves. thanks a ton for your help!
Hi, i am trying to figure this out in C#, since that is the language i am the most used to by far. but this is the first time i am doing http, and jsons in this manner.
to dumb it down to general coding concepts:
i am posting to "http://localhost:8765"
with the string "{"action":"findNotes","version":6,"params":{"cards":"deck:current"}}"
and the response i am getting is "AnkiConnect v.6"
the relevant code lines are:
and
giving me this in the console:
The text was updated successfully, but these errors were encountered: