Commit 59f1c078 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[EtherCalc] add Gargantext Utils for EtherCalc

parent 4ffbb2b4
module Gargantext.Utils.EtherCalc where
import Affjax (Error, Response, defaultRequest, request)
import Affjax.ResponseFormat as ResponseFormat
import Data.Either (Either(..))
import Data.HTTP.Method (Method(GET))
import Effect.Aff (Aff)
import Gargantext.Prelude
type Base = String
type NodeId = String
downloadCSV :: Base -> NodeId -> Aff (Either Error (Response String))
downloadCSV base nodeId = do
let req = defaultRequest
{ url = base <> "/" <> nodeId <> ".csv"
, responseFormat = ResponseFormat.string
, method = Left GET }
request req
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment