Skip to content

How to call an API from JavaScript #1035

Answered by DamianEdwards
hlaueriksson asked this question in Q&A
Discussion options

You must be logged in to vote

You'd need to manually compose your app with a common ingress server (i.e. another ASP.NET Core project that uses YARP) if you want the frontend JS from one app to be able to request the API from another app on a common host name, and then browse to that ingress server's endpoint URL. From the browser's point of view, your app is coded so that all resources are on the same host so you'll need to ensure that's the actual case.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@DamianEdwards
Comment options

Answer selected by hlaueriksson
@hlaueriksson
Comment options

@hlaueriksson
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants