fix: formdata inconsistencies
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { AxiosRequestConfig } from "axios"
|
import { AxiosRequestConfig } from "axios"
|
||||||
import { BehaviorSubject, Observable } from "rxjs"
|
import { BehaviorSubject, Observable } from "rxjs"
|
||||||
|
import cloneDeep from "lodash/cloneDeep"
|
||||||
import AxiosStrategy, {
|
import AxiosStrategy, {
|
||||||
cancelRunningAxiosRequest,
|
cancelRunningAxiosRequest,
|
||||||
} from "./strategies/AxiosStrategy"
|
} from "./strategies/AxiosStrategy"
|
||||||
@@ -49,8 +50,9 @@ export const sendNetworkRequest = (req: any) =>
|
|||||||
runAppropriateStrategy(req).finally(() => window.$nuxt.$loading.finish())
|
runAppropriateStrategy(req).finally(() => window.$nuxt.$loading.finish())
|
||||||
|
|
||||||
export function createRESTNetworkRequestStream(
|
export function createRESTNetworkRequestStream(
|
||||||
req: EffectiveHoppRESTRequest
|
request: EffectiveHoppRESTRequest
|
||||||
): Observable<HoppRESTResponse> {
|
): Observable<HoppRESTResponse> {
|
||||||
|
const req = cloneDeep(request)
|
||||||
const response = new BehaviorSubject<HoppRESTResponse>({
|
const response = new BehaviorSubject<HoppRESTResponse>({
|
||||||
type: "loading",
|
type: "loading",
|
||||||
req,
|
req,
|
||||||
|
|||||||
@@ -287,7 +287,12 @@ export function toggleGraphqlHistoryEntryStar(entry: GQLHistoryEntry) {
|
|||||||
// Listen to completed responses to add to history
|
// Listen to completed responses to add to history
|
||||||
completedRESTResponse$.subscribe((res) => {
|
completedRESTResponse$.subscribe((res) => {
|
||||||
if (res !== null) {
|
if (res !== null) {
|
||||||
if (res.type === "loading" || res.type === "network_fail") return
|
if (
|
||||||
|
res.type === "loading" ||
|
||||||
|
res.type === "network_fail" ||
|
||||||
|
res.type === "script_fail"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
addRESTHistoryEntry(
|
addRESTHistoryEntry(
|
||||||
makeRESTHistoryEntry({
|
makeRESTHistoryEntry({
|
||||||
|
|||||||
Reference in New Issue
Block a user