HTTP状态码 418 ——我只是个杯具(I'm a teapot) 客户端错误响应代码 418,表示服务器拒绝冲泡咖啡,因为他只是一个茶壶(杯具),只能用来泡茶。该状态码源于1998年和2014年愚人节定义超文本咖啡壶控制协议 RFC 2324 - Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) ...
意思是被发现你是一个爬虫了。 被人发现就会报这个错误。 你可以换一个网站进行爬取。 还有一种解决办法就是伪装变成一个主机。 随便起个名字req,作为一个变量储存一些信息。 url="aaa" headers={ "键":"值";(在F12中获取,只需要在冒号旁边分割就可以了。) } data=bytes(urllib.parse.urlencode({'name':...
(value ="HTCPCP Implementation", notes ="HTCPCP", hidden =true)@RequestMapping(path ="/coffee", method = RequestMethod.GET)publicResponseEntity<String>coffee(){ StatusJSON json =newStatusJSON("I'm a teapot \u2615");returnnewResponseEntity<>(json.toString(), HttpStatus.I_AM_A_TEAPOT); } L...
2.3.3. 418 I'm a Teapot TEA-capable pots that are not provisioned to brew coffee may return either a status code of 503, indicating temporary unavailability of coffee, or a code of 418 as defined in the base HTCPCP specification to denote a more permanent indication that the pot is a ...
418: I am a teapot, 拒绝用茶壶煮咖啡? 421: Misdirected Request, 请求被定向到无法相应的服务器。 422: Unprocessable Entity, 请求格式正确,但语义错误。 423: Locked, 访问资源被锁。 424: Failed Dependency, 因为前一个请求失败而请求失败。
I_AM_A_TEAPOT); assertThat(adapter.getStatusCode(), is(418)); assertThat(adapter.getReasonPhrase(), is(HttpStatus.I_AM_A_TEAPOT.getReasonPhrase())); } Example 5Source File: HttpStatusAdapterTest.java From problem-spring-web with MIT License 5 votes @Test void shouldUseHttpStatusEqualsAnd...
Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
(9)418 I am a teapot(彩蛋) 我是一个茶壶(杯具),是一个彩蛋。是设计HTTP协议的大佬,开的一个玩笑;很多程序猿也会在代码上搞类似的彩蛋(苦中作乐),但我们实际工作中,千万不要这么搞,因为商业产品往往是很严肃的,即使对产品本身逻辑没有什么影响,但指不定哪天,就会背刺你一下,就这么一下,很可能会导致我...
A 100-level status code tells you that the request you’ve made to the server is still in progress for some reason. This isn’t necessarily a problem, it’s just extra information to let you know what’s going on. 100: “Continue.” This means that the server in question has received...