• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 7813642793

07 Feb 2024 10:51AM UTC coverage: 31.137% (-0.09%) from 31.225%
7813642793

push

web-flow
feat: support vault AppRole authentication (#884)

Signed-off-by: Pat Losoponkul <pat.losoponkul@iohk.io>

4026 of 12930 relevant lines covered (31.14%)

0.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/mercury/mercury-library/agent/src/main/scala/io/iohk/atala/mercury/HttpClient.scala
1
package io.iohk.atala.mercury
2

3
import zio._
4

5
opaque type Header = (String, String)
6
object Header:
×
7
  def apply(key: String, value: String): Header = (key, value)
×
8
  def apply(tuple: (String, String)): Header = tuple
9
  extension (header: Header)
×
10
    def key: String = header._1
×
11
    def value: String = header._2
12

13
case class HttpResponse(status: Int, headers: Seq[Header], bodyAsString: String)
14

15
trait HttpClient {
16
  def get(url: String): Task[HttpResponse]
17
  def postDIDComm(url: String, data: String): Task[HttpResponse]
18
}
19

20
object HttpClient {
×
21
  def get(url: String): RIO[HttpClient, HttpResponse] =
×
22
    ZIO.serviceWithZIO(_.get(url))
×
23
  def postDIDComm(url: String, data: String): RIO[HttpClient, HttpResponse] =
×
24
    ZIO.serviceWithZIO(_.postDIDComm(url, data))
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc