This will not work, it will return NetworkError of RemoteData, my browser console will show OPTIONS 405 error, as well as on the server end log: REST Method Not Supported (405): Method options not supported at…
The Http.get is also Http.request, why the behaviour is so different? Did I make any mistake?
Is “https://domain.com?a=a&b=b” the actual url you are fetching? Also what domain is your elm app running on?
This sounds very much like a CORS issue. If the second request is not a “simple request” (see the section on the linked page for details on what that is) then the browser will automatically send an HTTP OPTIONS pre-flight request first to check whether the CORS settings for that site will allow your actual request. From your error message (“Method Not Supported (405): Method options not supported…”) it sounds ike the http server doesn’t support OPTIONS http requests and therefore the CORS pre-flight request fails.
indexRequest is a GET, which does not send a body. You would need to POST (maybe PUT, depending on the use case) in order to send a body. The server will of course need to support these methods and handle parsing the body.