The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. Back4App
  2. World Continents, Countries, and Cities
Public

1210
5633
1210
5633
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • Database
    Database
    GraphQL API Playground
    API Playground
    Get Started Guide
    Get Started
    Contributors
    Contributors

  1. Closed IssueClosed
  2. Can't to fetch data C#

New IssueNew

nizamarif_85 commented this issue on Apr 2020

Hi I' m doing a get request using c#. I'm using the below code. I can't seem to fetch data. What am I doing wrong?

public async Task GetCitiesOfAlbania() { var uri = new Uri(string.Format("https://parseapi.back4app.com/classes/Continentscountriescities_Country/AL"));

        var request = new HttpRequestMessage(HttpMethod.Post, uri);
        request.Headers.Add("X-Parse-Application-Id", "Private");
        request.Headers.Add("X-Parse-REST-API-Key", "AlsoPrivate");

        var client = new HttpClient();
        
        var response = await client.SendAsync(request);

        return response.Content.ReadAsStringAsync().Result; 

    }

Thanks Arif

Closed Issuenizamarif_85 closed this issue on Apr 2020
nizamarif_85 commented this issue on Apr 2020

worked when I used over to restSharp client

Please enter a comment for this issue.