本文介绍了Heroku部署错误:未找到请求的API端点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有工作的应用程序(可在此)

但我已经购买了<遥控器:!未找到请求的API端点。您是否正在使用正确的HTTP动词(即GET与POST),并且是否在尝试再次部署应用程序时指定了您的预期版本与Accept头?
错误。


即使当我将这个应用程序克隆到另一个文件夹并添加了一些!到 index.html ,我收到了同样的错误。

  C:\heroku\2\tandtpartners> git status 
在分支大师
上您的分支与heroku / master保持同步。

要提交的更改:
(使用git reset HEAD< file> ...停用)

修改:hello / templates / index。 HTML


C:\heroku\2\tandtpartners> git的承诺-m 变更仅索引的html
[主8a56e0d]仅改变索引HTML
1个文件改变,1个插入(+),1个删除( - )

C:\heroku\\2\tandtpartners> git commit -m仅更改索引html
[主8a56e0d]仅改变索引HTML
1文件改变时,1个插入(+),1个缺失( - )

C:\heroku\2\tandtpartners> GIT中的Heroku推master
计数对象:5,完成。
使用多达4个线程的增量压缩。
压缩对象:100%(5/5),完成。
写入对象:100%(5/5),432字节| 432.00 KiB / s,完成。
总计5(增量4),重用0(增量0)
远程:压缩源文件...完成。
远程:建立源:
远程:
远程:!未找到请求的API端点。您是否使用了正确的HTTP动词(即`GET`与`POST`),并且是否使用`Accept`标题指定了您的预期版本?
remote:
到https://git.heroku.com/tandtpartners.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能将一些文件推送到'https://git.heroku.com/tandtpartners.git'

我能做些什么?

解决方案

From

(对于未来用户:此答案仅在短时间内有效,但如果您遇到同样的问题,也许应该查看 )

I have the worked app (Availible here tandtpartners.herokuapp.com)
But I've got the
remote: ! The requested API endpoint was not found. Are you using the right HTTP verb (i.e. GET vs. POST), and did you specify your intended version with the Accept header?
error while trying to deploy the app again.
Even when I cloned this app to another folder and added some ! to index.html, I received the same error.

C:\heroku\2\tandtpartners>git status
On branch master
Your branch is up-to-date with 'heroku/master'.

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   hello/templates/index.html


C:\heroku\2\tandtpartners>git commit -m "Changed only index html"
[master 8a56e0d] Changed only index html
 1 file changed, 1 insertion(+), 1 deletion(-)

C:\heroku\2\tandtpartners>git commit -m "Changed only index html"
[master 8a56e0d] Changed only index html
 1 file changed, 1 insertion(+), 1 deletion(-)

C:\heroku\2\tandtpartners>git push heroku master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 432 bytes | 432.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: !       The requested API endpoint was not found. Are you using the right HTTP verb (i.e. `GET` vs. `POST`), and did you specify your intended version with the `Accept` header?
remote:
To https://git.heroku.com/tandtpartners.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/tandtpartners.git'

What can I do with that?

解决方案

From Heroku status page

(For future users: This answer is valid only for a short period of time, but if you got same problem, maybe you should gives a look at https://status.heroku.com/)

这篇关于Heroku部署错误:未找到请求的API端点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 09:29