Questions tagged [webapi]

Questions related to web browser's Web APIs specification. Web APIs is a set of numerous different APIs related to programmatically using web browser with your JavaScript code. For example the visual web page rendered is represented as and controlled by Document Object Model (DOM), which itself is a Web API. Or when using console.debug() function to log messages to the browser's console, you are using Console API.

Questions related to web browser's Web APIs specification.

Web APIs is a set of numerous different APIs related to programmatically controlling the functions of a web page that is run in the web browser with JavaScript code.

For example the visual web page rendered is represented as and controlled by Document Object Model (DOM), which itself is a Web API. Or when using console.debug() function to log messages to the browser's console, you are using Console API.

If you are new to Web APIs, you can read: Introduction to web APIs

1984 questions
0
votes
1 answer

Passing Endpoint value from server config to Angular 9 app

I'm working with an Asp.Net Core 3 web application implementing an Angular 9 application. And I'm needing to pass a Url (host for the web api) found in the config file to the angular application. What is the best way to do this? One thing I thought…
jhorton
  • 1,019
  • 3
  • 17
  • 36
0
votes
1 answer

How to check user with FindByNameAsync and FindByIdAsync both at the same time

How to check both id && username in the same time in this user variable to pass it in CheckPasswordSignInAsync method as first paramter and thanks var user = await _userManager.FindByNameAsync(userForLoginDto.UserName); …
0
votes
1 answer

Web API Edmx and Connection String in not cloned

I have a Web API project in TFS it contains all files including edmx files and connection string in webConfig When I cloned the project all files are exist in my local machine except the edmx files and connection string. Why those files are not…
rav
  • 211
  • 5
  • 14
0
votes
0 answers

Document.hasFocus() always returns true when print dialog is opened in Edge on Windows 10

I was trying to use window.setInterval() API to check the result of document.hasfocus(). Normally, when we click to another browser tab or another application, the document.hasfocus() of one page will return false. However, when I tried to print a…
0
votes
1 answer

Search best practice for claims based authorization with lot of permissions asp net core?

i'm working with the security in my application with asp net core webAPI, in my application the Admin create a new user with permission and the json send to back look like this: User: { Name:"Alex", SurName:"Park", Email:…
resstel
  • 39
  • 6
0
votes
1 answer

Browser permissions for GetUserMedia from different camera devices

In the site I am coding, I want the user to have the option of toggling between different video input devices and view the stream. I am able to enumerate all the devices using navigator.mediaDevices.enumerateDevices() and filtering this by kind…
0
votes
0 answers

C# controller to receive HttpRequest and respond back

I have very limited exprerience in MVC, WebAPI,C# etc. I was asked to create a controller that contains a method that receives an HttpRequest (XML) and responds with back with an HttpResponse I have come up to this state and I am confused: …
PanosPlat
  • 940
  • 1
  • 11
  • 29
0
votes
0 answers

i want to integrate backend codes i.e. rest api to front end reactjs code

i want to integrate backend codes i.e. rest api to front end reactjs code. i have tried usingaxios . pls help i am new to react. the code is below: import React, { useState } from "react"; import "./Register.css"; import { useHistory } from…
0
votes
1 answer

Our project makes constant use of static outer classes that have non-static nested classes - might this have any pitfalls?

We're currently working on a Web-API project written in C#. It contains a lot of static outer classes that have non-static nested classes. Something like public static class OuterClass { public class InnerClass : ParentClass { …
0
votes
1 answer

.Net Core API read content from Json File

I am trying to read content from a json file in .Net core API and assign to a list and use it for doing business logic. API Layers: Project -> Business -> Repository -> DB I need to read content from a json file in the Business layer. File content…
0
votes
0 answers

Can a website directly interface with os? WebUSB? Access windows dism?

I am lucky and thankful to be home for the holidays, and I wish everyone who reads this the best! I have an annual habit of doing windows clean installs on many of my family members' pcs along with my own. I use dism in cmd/PowerShell on windows to…
Anthony Alphabet
  • 1,175
  • 2
  • 8
  • 10
0
votes
0 answers

Error in calling POST method on fetch method

I am receiving below error when calling my WebAPI from react application using fetch().then().then(). 415 Unsupported Media Type React code: function handleSubmit() { console.log(selectedClass, textAreaData); let classInfo = { className:…
Amit Kumar
  • 591
  • 2
  • 8
  • 24
0
votes
0 answers

How to add a server side check that api is only called by tenant admin

My requirement is to add a check here that this API route/end point is only called by tenant admin. AppController.cs [Route("api/[controller]")] [Authorize(Policy = "App.ReadWrite")] [ApiController] …
Deepak Kothari
  • 1,601
  • 24
  • 31
0
votes
1 answer

OAuth Authentication - Is it possible to keep bearer token active if the user is active

Is it possible to keep bearer token active if the user is active
0
votes
1 answer

How to put Angular Bootstrap Table "Complete Example" working with a real service?

I am start doing some stuff in angular. I implemented this example in my current project (the one named "Complete Example"): https://ng-bootstrap.github.io/#/components/table/examples Everything is working fine, However I have a simple question but…
user1910232
  • 151
  • 1
  • 3
  • 12