0

I want to send data from browser url to my SqlServer database. almost all video in youtube use postman but i don't want to use that. here is my class enter image description here

The server Address is https://localhost:44378/api/Home . How can i data from browser url ?

1
  • Perhaps, i should use [FromRoute] attribute ? Commented Aug 9, 2021 at 8:51

1 Answer 1

1

You can try to pass data via query string.For example

https://localhost:44378/api/Home?Id=1&&Tempreture=20&&Humidiy=1&&LightIntensity=2
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, it work's fine. note that in api method we should write [Fromquery] attribute
If it is helpful,can you mark it as answer?Thank you.
Here is a link about how to accept an answer on stackoverflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.