hoppscotch-extension
hoppscotch-extension copied to clipboard
GET body is ignored with Firefox extension
The Firefox extension doesn't seem to relay the request body on GET
requests. Although this is a very unusual use-case, it's quite common with Elasticsearch for instance.
Steps to reproduce
- Open https://hoppscotch.io with Firefox with the browser extension installed
- In Settings, set the interceptor to the Firefox browser extension
- Choose "Use the browser extension to send requests"
- Create a GET request with a body (Good target candidate is Elasticsearch using this query type)
Expected behavior
The request body should be sent to the endpoint.
Actual behavior
All but the request body is sent to the endpoint.
Tested on
OS: Manjaro Linux x86_64 Kernel: 5.15.49-1-MANJARO Firefox: 101.0.1 (64-bit) Extension version: 0.24
I have confirmed this is not a problem when using Proxyscotch.
I am pretty sure we had a similar discussion on the main repo. See: hoppscotch/hoppscotch#1065
I am not closing this issue though for now.
Also since the extension is still restricted by the browser I am curious if there is any way we can actually feasibly implement this.
@AndrewBastin I think it's reasonable to not support it since it technically isn't even a proper use of the GET spec. And in case it simply isn't feasible to implement this functionality with axios, a better solution might be to notify the end-user that the Body payload isn't supported for GET requests when not using the proxy. Just throwing out ideas of course, but perhaps a pop-up message showing a warning if the user tries to do it anyways? Although I can see this might be more relevant for the main repo.
Yeah I think a sort of warning is warranted. We are kinda toying with a general "request inspection" system internally where we check the request live for any weird non-standard behaviour that may or may not be supported by Hoppscotch (like here).