on master help sign in
Switch to Http.get in a couple places

The nginx proxy needs certain requests to be GET if it is going to read the files directly.

commitd371510d9f1e37d01af069d39682fbb8e3ebf336 authorEvan Czaplicki <evancz@users.noreply.github.com> dateSun 24 Mar 2019, 15:04 (8 years ago) parent2469006
2 files changed+6−4
builder/src/Deps/Diff.hs+1−1 builder/src/Deps/Solver.hs+5−3
builder/src/Deps/Diff.hs+1−1
@@ -371,7 +371,7 @@ getDocs cache manager name version =
371371 return $ Left Exit.DP_Cache
372372 else
373373 do let url = Website.metadata name version "docs.json"
374− Http.post manager url [] Exit.DP_Http $ \body ->
374+ Http.get manager url [] Exit.DP_Http $ \body ->
375375 case D.fromByteString Docs.decoder body of
376376 Right docs ->
377377 do File.writeUtf8 path body
builder/src/Deps/Solver.hs+5−3
@@ -220,7 +220,8 @@ getConstraints name version =
220220
221221getConstraintsHelp :: Stuff.PackageCache -> Connection -> Pkg.Name -> V.Version -> IO (Either Problem Constraints)
222222getConstraintsHelp cache connection name version =
223− do let path = Stuff.package cache name version </> "elm.json"
223+ do let home = Stuff.package cache name version
224+ let path = home </> "elm.json"
224225 outlineExists <- File.exists path
225226 if outlineExists
226227 then
@@ -246,10 +247,11 @@ getConstraintsHelp cache connection name version =
246247 return (Left (UnavailableOffline name version))
247248
248249 Online manager ->
249− Http.post manager (Website.metadata name version "elm.json") [] BadHttp $ \body ->
250+ Http.get manager (Website.metadata name version "elm.json") [] BadHttp $ \body ->
250251 case D.fromByteString constraintsDecoder body of
251252 Right cs ->
252− do File.writeUtf8 path body
253+ do Dir.createDirectoryIfMissing True home
254+ File.writeUtf8 path body
253255 return $ Right cs
254256
255257 Left _ ->