如果api服务是在PC而不是服务器上编写的,我该如何进行API GET请求? [英] How do I do a API GET request if the api service is written on a pc and not a server?

查看:101
本文介绍了如果api服务是在PC而不是服务器上编写的,我该如何进行API GET请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用sql lite编写了一个API webservice。它没有部署在服务器上,所以没有端点等。我们如何通过测试PC的GET请求调用该服务?



我尝试了什么:



我们已经尝试过研究这个问题,但这很难,因为我们实际上并不知道要研究什么。

We have written an API webservice using sql lite. It's not deployed on a server so there is no endpoint, etc. How can we call that service with a GET Request from a test pc?

What I have tried:

We have tried researching the problem, it's a but hard since we dont actually know what to research.

推荐答案

您需要在该PC上安装IIS(它是您需要通过添加Windows功能启用的可选组件)并为您的服务创建一个站点并进行部署它到那台PC。然后,如果网络上的其他机器知道它,您可以通过IP地址或PC名称使用它。



http:// yourIPHere / ...
You'll need to install IIS on that PC (it's an optional component you need to enable via Add Windows Features) and create a site for your service and deploy it to that PC. You can then use it by IP address or the PCs name if other machines on the network know it

http://yourIPHere/...


您可以使用 ngrok - 安全内省隧道到本地主机 [ ^ ]

隧道请求到你的localhost。
You can use ngrok - secure introspectable tunnels to localhost[^]
to tunnel request to your localhost.


这篇关于如果api服务是在PC而不是服务器上编写的,我该如何进行API GET请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆