Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICFP contest 2024
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nathaniel Mattsson
ICFP contest 2024
Commits
947c243e
Commit
947c243e
authored
8 months ago
by
Hugo Hörnquist
Browse files
Options
Downloads
Patches
Plain Diff
Add cabal and requests.
parent
b43674ce
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Request.hs
+26
-0
26 additions, 0 deletions
Request.hs
icfpc.cabal
+28
-0
28 additions, 0 deletions
icfpc.cabal
with
54 additions
and
0 deletions
Request.hs
0 → 100644
+
26
−
0
View file @
947c243e
{-# LANGUAGE OverloadedStrings #-}
module
Request
where
import
Network.HTTP.Req
import
Data.ByteString
(
ByteString
)
import
qualified
Data.ByteString.Char8
as
BS
import
Control.Monad.IO.Class
postRequest
::
IO
()
postRequest
=
runReq
defaultHttpConfig
$
do
let
url
=
https
"boundvariable.space"
/:
"communicate"
let
body
::
ByteString
body
=
BS
.
pack
"S'%4}).$%8"
let
headers
=
header
"Authorization"
"Bearer 8cd1314b-f873-4ab7-891f-781d814ed60e"
<>
header
"User-Agent"
"Närke Nation"
response
<-
req
POST
url
(
ReqBodyBs
body
)
bsResponse
headers
liftIO
$
BS
.
putStrLn
$
responseBody
response
This diff is collapsed.
Click to expand it.
icfpc.cabal
0 → 100644
+
28
−
0
View file @
947c243e
cabal-version: >= 1.10
name: icfpc2024
version: 0.1
license: AGPL
author: Hugo Hörnquist, Nathaniel Mattsson
maintainer: hugo@lysator.liu.se
homepage: https://git.lysator.liu.se/boomknife/icfp-contest-2024
category: Network
build-type: Simple
executable Main
main-is: main.hs
ghc-options: -threaded -Wall -W
-Wno-missing-signatures
other-modules:
Eval,
Expression,
Parse,
Request,
Serialize
build-depends:
base >=4.9,
bytestring,
containers,
mtl,
req,
parsec
default-language: Haskell2010
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment