Category : api

I would like to write a PowerShell script to download the GitHub repo in ZIP format by following this instruction: https://docs.github.com/en/rest/reference/repos#contents $Token = ‘MyUserName:MyPAT’ $Base64Token = [System.Convert]::ToBase64String([char[]]$Token) $Headers = @{ "Authorization" = ‘Basic {0}’ -f $Base64Token; "accept" = "application/vnd.github.v3+json" } $Uri = "https://api.github.com/repos/{owner}/{repo}/zipball" $r = Invoke-WebRequest -Headers $Headers -Uri $Uri -Method Get | Out-File "D:MyRepo.zip" ..

Read more

I’m using Windows 7 64bits and been trying to compile the MEGA api with MSYS2 using the autotools, but after running ‘make’ compilation stops showing this error: # make make all-recursive make[1]: Entering directory ‘/d/sdk-develop’ Making all in include make[2]: Entering directory ‘/d/sdk-develop/include’ make[2]: Nothing to be done for ‘all’. make[2]: Leaving directory ‘/d/sdk-develop/include’ make[2]: ..

Read more

private void button1_Click(object sender, EventArgs e) { try { var webRequest = (HttpWebRequest)WebRequest.Create("http://url"); var webResponse = (HttpWebResponse)webRequest.GetResponse(); var reader = new StreamReader(webResponse.GetResponseStream()); string s = reader.ReadToEnd(); var jsonResult = JsonConvert.DeserializeObject(s).ToString() //var result = JsonConvert.DeserializeObject<Employee>(jsonResult); var anonExample = new { summary = new Employee() }; var deserialized = JsonConvert.DeserializeAnonymousType(jsonResult, anonExample).summary; //var deserialized = JsonConvert.DeserializeObject<RootObject>(jsonResult).Summary; //// DataTable ..

Read more

Currently using the C++ implementation of libcurl to interact with the Spotify API, looking for a way to pass multiple ‘Request Body Parameters’ during a POST request. The fields required are: Fields needed Looking at the example of a POST request found in libcurl’s documentation, it seems that this line curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "name=daniel&project=curl"); passes two ..

Read more

Got a problem with VS React-Redux template deployed as a docker container connecting to api docker container. Below are the given facts: Fact 1. I’ve got 3 Docker Windows containers in docker hub: solomiosisante/test:sqlserver solomiosisante/test:api solomiosisante/test:react Fact 2. I managed to make the api connect to sqlserver and make them communicate by creating a docker ..

Read more