Táto téma bola archivovaná. Ak potrebujete pomôcť, založte prosím novú otázku.
Open the payload of a HTTP error
I'm a software developer working on backend services, always juggling between Firefox and Chrome (because none of them fully satisfy my needs). What I need from them is to behave the way it will be most practical for me, which isn't necessarily aligned with the majority of users.
My current problem is this. I work with APIs which in my daily work often return various HTTP errors. These errors also contain a payload which describes the problem in detail. I want to be able to see this payload easily in the browser. Yes, I can use other tools like Postman for this (which I do), but for simple GET requests without special request headers it would be much more practical to just use a browser.
Currently, when my API opens an error (for example a 400 Bad Request), Firefox decides to just silently go back into the previous page (undos the URL change). If I open the Network tab in the Web Developer view, I can however see the failing response with all of its details. Still, this is too impractical for me.
BTW, the response contains a custom Content-Type which isn't recognized by Firefox by default. But Firefox isn't downloading the payload as a file (like it would usually do for a successful page load of an unknown Content-Type), it just silently doesn't do anything. I've installed an extension to handle my custom Content-Types (called "Open in Browser"), but since Firefox isn't attempting to open this one, I can't use it in this case.
So, how can I force Firefox to stay on that URL and show the response payload in the window? If not in vanilla Firefox, any plugins? I've already kind of spent too much time on this for my liking. :/
Všetky odpovede (4)
This forum is focused on Firefox user problems not developer issues.
Please ask your web dev question
1. stack overflow and tag it firefox https://stackoverflow.com/questions/tagged/firefox
2. discourse firefox dev tools forum
HTTP messages are how data is exchanged between a server and a client. There are two types of messages: requests sent by the client to trigger an action on the server, and responses, the answer from the server. HTTP messages are composed of textual information encoded in ASCII, and span over multiple lines. In HTTP/1.1, and earlier versions of the protocol, these messages were openly sent across the connection. In HTTP/2, the once human-readable message is now divided up into HTTP frames, providing optimization and performance improvements. Web developers, or webmasters, rarely craft these textual HTTP messages themselves: software, a Web browser, proxy, or Web server, perform this action. They provide HTTP messages through config files (for proxies or servers), APIs (for browsers), or other interfaces.
In response to Roland...
Ok, but I still consider myself primarily as a Firefox user, maybe a power user, but a user nonetheless. With that in mind I posted it here, expecting to maybe get a reference to a config option in "about:config" or to a plugin which is just somewhere there and I didn't notice it.
I see Stack Overflow more as a place where people ask about specific coding problems, and not how to use a common application.
The dev tool forum is more about the Developer Tools feature of Firefox, again not something I'm interested in and where my question doesn't really fit.
But I guess I can go and try my luck on Stack Overflow, if there's no chance of getting help here. Even though I still think this question fits here best...
Upravil(a) marko.vodanovic dňa
The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field.
For more information visit this link...