hoppscotch-extension icon indicating copy to clipboard operation
hoppscotch-extension copied to clipboard

GET body is ignored with Firefox extension

Open BuriedStPatrick opened this issue 2 years ago • 3 comments

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

  1. Open https://hoppscotch.io with Firefox with the browser extension installed
  2. In Settings, set the interceptor to the Firefox browser extension
  3. Choose "Use the browser extension to send requests"
  4. 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.

BuriedStPatrick avatar Jun 29 '22 13:06 BuriedStPatrick

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 avatar Jun 30 '22 17:06 AndrewBastin

@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.

BuriedStPatrick avatar Jun 30 '22 22:06 BuriedStPatrick

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).

AndrewBastin avatar Jul 01 '22 12:07 AndrewBastin