Client API feels inconsistent
See original GitHub issueThere are four expect
methods:
def expect[A](s: String)(implicit d: EntityDecoder[F, A]): F[A]
def expect[A](uri: Uri)(implicit d: EntityDecoder[F, A]): F[A]
def expect[A](req: F[Request[F]])(implicit d: EntityDecoder[F, A]): F[A]
def expect[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[A]
-
The first two work like special cases where the request is a GET. At the same time, there are two methods called
get
with the exact same parameters as the first twoexpect
s. The same is happening for theexpectOr
methods. -
There is the method:
def expectOption[A](req: Request[F])(implicit d: EntityDecoder[F, A]): F[Option[A]]
But there isn’t the corresponding one for
F[Request[F]]
:def expectOption[A](req: F[Request[F]])(implicit d: EntityDecoder[F, A]): F[Option[A]]
-
Tha API has a dedicated DSL for GET requests but not for other commonly used methods: DELETE, PUT, POST, HEAD.
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (15 by maintainers)
Top Results From Across the Web
Why ALL APIs are inconsistent? : r/rails - Reddit
Idempotent APIs are a solution. If I'm sending a PUT/PATCH with the same body my first request might mutate data on the server...
Read more >Very strange/inconsistent behaviour when making a GET ...
I am busy with a angular4 web app that uses the youtubeInMp3 API. Everything works as it should when downloading mp3 files using...
Read more >How AWS dumps the mental burden of inconsistent APIs on ...
AWS APIs are inconsistent among different services, between related services, or within a single service - that's a problem for developers.
Read more >I am getting inconsistent response times when using REST ...
I have an external client that uses REST API to get responses from the BPM server. The response times are inconsistent. Sometimes the...
Read more >Genesys API Inconsistent responses
When I am trying to hit Genesys API's in AWS, I see some inconsistency in response. It seems I need to hit 4-5...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Remove/Deprecate all overloads.
Would it be worthwhile to deprecate/remove
def expect[A](s: String)(implicit d: EntityDecoder[F, A]): F[A]
, i.e. require a validUri
to be passed rather than aString
?Uri
>String
motivates this question.