VS 2015 How to make a web API call to external site-VBForums
Results 1 to 4 of 4

Thread: How to make a web API call to external site

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2017
    Posts
    2

    How to make a web API call to external site

    Hello everyone.

    I'm taking the first steps in VB.net. I have an API key provided to me by a sports database. I would like to know how to connect to this database, using an API key to download the data in json format.

    What instructions should I write? Thanks so much

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    98,331

    Re: How to make a web API call to external site

    You should be asking the provider of the API, not us. How you interact with their service is up to them. It's more than likely the case that they have documentation and/or examples available.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2017
    Posts
    2

    Re: How to make a web API call to external site

    thanks, in fact I already did and through Postman for Chrome, I did some tests.
    I would need the code VB.net to create a web page that makes the request with the verb GET

  4. #4
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    98,331

    Re: How to make a web API call to external site

    You should be able to simply create a WebClient object and call the appropriate method for the type of data you expect to receive. I'd start by reading the documentation for the WebClient class and its methods, then search for examples of the relevant one(s) if you need them.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width