akka / akka/akka-http

Make it easier to send a Multipart.FormData request

Open
#81 5 comments 0 reactions 0 assignees View on GitHub
1 - triaged
Dominant language
Scala
Stars
1.4k
Forks
584
Avg merge
14h 33m
Merged PRs (30d)
24

Description

**Issue by [ktoso](https://github.com/ktoso)**
_Monday Feb 29, 2016 at 16:13 GMT_
_Originally opened as https://github.com/akka/akka/issues/19916_

---

@sirthias @jrudolph did I miss some API or that's the current way to put it?

``` scala
val formData = Multipart.FormData(BodyPart("lol", HttpEntity(MediaTypes.`application/pdf`, new File("example.txt"))))
val requestEntity = Await.result(Marshal(formData).to[RequestEntity], 1.second)
val req = HttpRequest(HttpMethods.POST, uri = "http://example.com", entity = requestEntity)
Http().singleRequest(req)
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the current Multipart.FormData, Marshal, RequestEntity, and HttpRequest usage shown in the issue, then inspect the surrounding HTTP client API. The issue provides no target API or named files, so determine the intended simpler construction and define completion criteria with maintainers before changing code.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.