cannot send post request to my API controller with HttpClient

I am working on communication between API <-> webAPP via HttpClient. This is my API controller: [HttpPut, Route("voipport/{newPort}")] public async Task<IActionResult> PutVoipPort(int newPort) { try { await _repository.ChangePort(newPort); await _repository.AddNewRecord("PutVoipPort", "Success"); return Ok(); } catch(Exception exception) { return BadRequest(exception.Message); } } this is fired from website with this: public async Task VOIPChangePort(int newPort) { var… Read More cannot send post request to my API controller with HttpClient

Retrieving complex api information and putting it in a listviewbuilder

I am trying to create an mobile app where i can put in a name and get information from an api afterwards, this was working until the api got more complex. can share this information btw. It is showing nothing but the image. api that works when i retrieve it: {"id":"Pw_wOwAmqDmB3slQO_8PkKXLoE56qnBk5f-qdW0fKVTfvAmm", "accountId":"_MkPpRhr6tK22xRT8TofYHPyACcmURn0cp-U9GbL1xTQzhRfvaw4ZF7P", "puuid":"RT0wLpw9fOUMgB4HUWDVoMi6_F20W4yhut5-q1bA7Izhl3dPjv5iF2JzqXkLQJYPtf2MBMcvooMmGA", "name":"Zeri outplay",… Read More Retrieving complex api information and putting it in a listviewbuilder

extracting items from json with python

I made an api query which returns a json as response. I am trying to extract the temperature_2m for the first time in the list (2022-11-03T00:00) which is 5.7, not sure how to get it with python api_query ={ "latitude": 52.52, "longitude": 13.419998, "generationtime_ms": 0.36203861236572266, "utc_offset_seconds": 0, "timezone": "GMT", "timezone_abbreviation": "GMT", "elevation": 38.0, "hourly_units": {… Read More extracting items from json with python

How can i save a bool value as 0 or 1 to database in a json body?

I have an endpoint as follows: https://myapi/user/1234 the body is { "ExpiryDays": "50", "Access1": "False", "Access2": "True", "Access3": "False", "Address": "500", } In the database the columns and datatype are ExpiryDays int Access1 bit, not null Access2 bit, not null Access3 bit, not null Address nvarchar(max) I would have though the False would be converted… Read More How can i save a bool value as 0 or 1 to database in a json body?

Why is my API returning NULL while using PHP's `json_decode(file_get_contents($link),true);`

I’m trying to pull crypto-mining data from the server’s API; however, when I run the .php file, it comes back with null: HTML/PHP $meow_base_data = json_decode(file_get_contents($meow_base_api), true); var_dump($meow_base_data); var_dump only says "NULL" – no other information. FYI – I did check json_decode (file_get_contents) returns null and used the JSON Lint link – the JSON comes… Read More Why is my API returning NULL while using PHP's `json_decode(file_get_contents($link),true);`