Giter VIP home page Giter VIP logo

Comments (9)

lechnerc77 avatar lechnerc77 commented on May 31, 2024 1

@Vanshata17 ,

your questions jumping between different problems and it seems to me that your questions do not touch any lessons or their respective content or the homework connected to it.

In case you have generic questions around Azure Functions:

As issues in this GitHub repository should focus on the Azure Functions University and should not serve as a generic Q&A like e.g. StackOverflow I close this issue

from azure-functions-university.

lechnerc77 avatar lechnerc77 commented on May 31, 2024

Hi @Vanshata17 ,

welcome to Azure Functions University. I think I am not 100% clear about you question: currently there is no HTTP or Blob trigger lesson about .NET 5 available in the lessons, do you reference the .NET Core lessons?

You question does not contain a question, but a description. Can you please rephrase it to a question that we can then follow up upon?

Regards
Christian

from azure-functions-university.

Vanshata17 avatar Vanshata17 commented on May 31, 2024

from azure-functions-university.

lechnerc77 avatar lechnerc77 commented on May 31, 2024

From the caller perspective you concatenate them via &:

http://localhost:7071/api/HttpTrigger1?firstname=Mark&lastname=Hamill

In your code you can then access them via the name you assigned in the call. Taking the example from above this would mean:

  • TypeScript:

    let firstname = req.query.firstname
    let lastname = req.query.lastname
  • .NET:

    string firstname = req.Query["firstname"];
    string lastname = req.Query["lastname"];

from azure-functions-university.

Vanshata17 avatar Vanshata17 commented on May 31, 2024

from azure-functions-university.

Vanshata17 avatar Vanshata17 commented on May 31, 2024

from azure-functions-university.

lechnerc77 avatar lechnerc77 commented on May 31, 2024

Let us shortly summarize the requirement:

  • you want an HTTP triggered function
  • the function should receive data via the request body
  • the data should be taken from the request and returned to the caller

As you want to transfer the data via the request body, you are using a POST request that calls the Function endpoint with the data in the request body as JSON. Due to the POST request you cannot use query parameters to transfer the data.

Your scenario is covered in the HTTP trigger lesson i. e. Changing the template for POST requests

Concerning your error message, I would assume that there is a problem with an IF ... ELSE statement that always expects a query parameter from the caller. Please take a look at the code in the section mentioned above as this highlights how to deal with the different types of requests.

In general, I would highly recommend to re-watch the HTTP trigger lesson on YouTube, as you scenario is discussed and demoed there.

from azure-functions-university.

Vanshata17 avatar Vanshata17 commented on May 31, 2024

from azure-functions-university.

Vanshata17 avatar Vanshata17 commented on May 31, 2024

from azure-functions-university.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.