yapi icon indicating copy to clipboard operation
yapi copied to clipboard

post 请求 报404

Open ysfh opened this issue 7 years ago • 11 comments

版本号

~

什么问题

~

如何复现此问题

~

什么浏览器

~

什么系统(Linux, Windows, macOS)

errcode404 errmsg不存在的api, 当前请求path为 /search/total, 请求方法为 GET ,请确认是否定义此请求。 datanull

ysfh avatar Dec 06 '18 06:12 ysfh

同问

dreamsqin avatar Dec 10 '18 08:12 dreamsqin

请求方法改为get 就可以访问模拟接口 但是改为post 就报404 版本啥的都升级了 难道post 类型不能模拟运行?

ysfh avatar Dec 14 '18 03:12 ysfh

发现了同样的bug

paddy0914 avatar Jan 02 '19 11:01 paddy0914

已解决,直接通过Mock连接无法访问post请求,只能访问get请求,猜测是未传递参数,如果在项目中请求post就不会报错了~

dreamsqin avatar Feb 16 '19 01:02 dreamsqin

请问这个问题又解决吗,我也遇到了同样的问题。

aishxi avatar Aug 16 '19 10:08 aishxi

请问有解决方案了吗,V18.3依旧存在这个问题

llanc avatar Sep 09 '19 09:09 llanc

同事解决了,环境域名那里一定要选 https。 image

因为接口定义的 mock,不管环境域名是 http 还是 https,不知为何都写死了用 https。一旦环境域名用了 http 对不上就 404。 image

xofred avatar Oct 16 '19 08:10 xofred

同问,,

maybee10012 avatar Apr 03 '20 08:04 maybee10012

{"errcode":404,"errmsg":"不存在的api, 当前请求path为 /payments, 请求方法为 GET ,请确认是否定义此请求。","data":null}

maybee10012 avatar Apr 03 '20 08:04 maybee10012

YAPI POST接口页面内的mock地址应该不是直接拿来点的,浏览器发不出POST请求。可以用POSTMAN发是可以获取返回的

DA1Y1 avatar Apr 16 '21 08:04 DA1Y1

要在编辑页面设置具体的请求方式 Git

CodeSnailss avatar Jan 08 '24 01:01 CodeSnailss