p
hammock
package hammock
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- hammock
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- implicit class AsSyntaxOnHttpF[A] extends AnyRef
- trait Codec[A] extends Encoder[A] with Decoder[A] with Serializable
- class CodecException extends Throwable
- trait ContentType extends AnyRef
- trait Decoder[A] extends Serializable
- final case class Delete(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- trait Encoder[A] extends Serializable
- sealed trait Entity extends AnyRef
- final case class Get(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- type HammockF[A] = EitherK[HttpF, MarshallF, A]
- implicit class HammockFSyntax[A] extends AnyRef
- final case class Head(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- sealed trait HttpF[A] extends AnyRef
- case class HttpRequest(uri: Uri, headers: Map[String, String], entity: Option[Entity]) extends Product with Serializable
- class HttpRequestC[F[_]] extends AnyRef
- implicit class HttpRequestIOSyntax[A] extends AnyRef
- case class HttpResponse(status: Status, headers: Map[String, String], entity: Entity) extends Product with Serializable
- trait InterpTrans[F[_]] extends AnyRef
- trait Method extends AnyRef
- final case class Options(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- final case class Post(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- final case class Put(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
- case class Status(code: Int, text: String, description: String) extends Product with Serializable
- final case class Trace(req: HttpRequest) extends HttpF[HttpResponse] with Product with Serializable
-
case class
Uri(scheme: Option[Scheme] = None, authority: Option[Authority] = None, path: String = "", query: Map[String, String] = Map(), fragment: Option[Fragment] = None) extends Product with Serializable
Represents a HttpRequest URI.
Represents a HttpRequest URI.
You have several different options for constructing Uri:
scala> val uri1 = uri"http://google.com" uri1: hammock.Uri = Uri(Some(http),None,google.com,Map(),None) scala> val uri2 = Uri(None, None, "path", Map(), None) uri2: hammock.Uri = Uri(None,None,path,Map(),None) scala> val uri3 = Uri.fromString("http://google.com") uri3: Either[String,hammock.Uri] = Right(Uri(Some(http),None,google.com,Map(),None))
- scheme
scheme of the uri. For example https
- authority
authority of the uri. For example: user:[email protected]:443
- path
path of the uri. For example /books/234
- query
query string of the uri. For example ?page=3&utm_source=campaign
- fragment
fragment of the uri. For example #header1
-
implicit
class
UriStringContext extends AnyRef
Unsafe string interpolator allowing uri parsing.
Unsafe string interpolator allowing uri parsing. It's unsafe because in case of any error happen (a Left is returned by the
fromString
method), it will throw an exception.scala> uri"http://user:[email protected]/path?page=4#index" res1: hammock.Uri = Uri(Some(http),Some(user:pass),pepegar.com/path,Map(page -> 4),Some(index))
Value Members
- implicit val embedString: Embedder[(UriContext.type, UriContext.type), String, Input, UriInterpolator.type]
- implicit def hammockNT[F[_]](implicit arg0: Sync[F], H: InterpTrans[F], M: ~>[MarshallF, F]): ~>[HammockF, F]
- object Codec extends Serializable
- object CodecException extends Serializable
- object ContentType
- object Decoder extends Serializable
- object Encoder extends Serializable
- object Entity
- object Hammock
- object HttpRequest extends Serializable
- object HttpRequestC
- object HttpResponse extends Serializable
- object Method
- object Ops
- object Status extends Serializable
- object Uri extends Serializable
- object UriContext extends Context
- object UriInterpolator extends Interpolator
- object marshalling