mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 06:05:31 +03:00
Rename field.
This commit is contained in:
parent
7301530495
commit
766d6b02d7
@ -149,7 +149,7 @@ function lookupOrPerform(portsFile, mode, rawRequest, hasFsAccess, useCache) {
|
||||
"User-Agent": "request",
|
||||
...request.headers,
|
||||
},
|
||||
...rawRequest.useCache,
|
||||
...rawRequest.cacheOptions,
|
||||
});
|
||||
|
||||
console.timeEnd(`fetch ${request.url}`);
|
||||
|
@ -334,7 +334,7 @@ request request__ expect =
|
||||
, headers = request__.headers
|
||||
, method = request__.method
|
||||
, body = request__.body
|
||||
, useCache = request__.options |> Maybe.map encodeOptions
|
||||
, cacheOptions = request__.options |> Maybe.map encodeOptions
|
||||
}
|
||||
in
|
||||
requestRaw request_ expect
|
||||
@ -409,7 +409,7 @@ requestRaw request__ expect =
|
||||
:: request__.headers
|
||||
, method = request__.method
|
||||
, body = request__.body
|
||||
, useCache = request__.useCache
|
||||
, cacheOptions = request__.cacheOptions
|
||||
}
|
||||
in
|
||||
Request
|
||||
|
@ -11,7 +11,7 @@ type alias Request =
|
||||
, method : String
|
||||
, headers : List ( String, String )
|
||||
, body : Body
|
||||
, useCache : Maybe Encode.Value
|
||||
, cacheOptions : Maybe Encode.Value
|
||||
}
|
||||
|
||||
|
||||
@ -40,5 +40,5 @@ codec =
|
||||
|> Codec.field "method" .method Codec.string
|
||||
|> Codec.field "headers" .headers (Codec.list (Codec.tuple Codec.string Codec.string))
|
||||
|> Codec.field "body" .body StaticHttpBody.codec
|
||||
|> Codec.nullableField "useCache" .useCache Codec.value
|
||||
|> Codec.nullableField "cacheOptions" .cacheOptions Codec.value
|
||||
|> Codec.buildObject
|
||||
|
@ -273,7 +273,7 @@ all =
|
||||
, headers =
|
||||
[]
|
||||
, body = BackendTask.Http.emptyBody
|
||||
, useCache = Nothing
|
||||
, cacheOptions = Nothing
|
||||
}
|
||||
(StringBody "This is a raw text file.")
|
||||
|> expectSuccess []
|
||||
@ -813,7 +813,7 @@ get url =
|
||||
, url = url
|
||||
, headers = []
|
||||
, body = BackendTask.Http.emptyBody
|
||||
, useCache = Nothing
|
||||
, cacheOptions = Nothing
|
||||
}
|
||||
|
||||
|
||||
@ -823,7 +823,7 @@ post url =
|
||||
, url = url
|
||||
, headers = []
|
||||
, body = BackendTask.Http.emptyBody
|
||||
, useCache = Nothing
|
||||
, cacheOptions = Nothing
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user