-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from kuzzleio/call-proper-http-routes
[HTTP] Call controller actions using URL from _publicApi instead of _query endpoint
- Loading branch information
Showing
23 changed files
with
584 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/InvalidJSON.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.kuzzle.sdk.coreClasses.exceptions | ||
|
||
class InvalidJSON(json: String) : KuzzleException("Invalid JSON \"$json\".", 0) |
8 changes: 7 additions & 1 deletion
8
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/KuzzleExceptionCode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/MissingActionException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.kuzzle.sdk.coreClasses.exceptions | ||
|
||
open class MissingActionException : KuzzleException(KuzzleExceptionCode.MISSING_ACTION) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/MissingControllerException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.kuzzle.sdk.coreClasses.exceptions | ||
|
||
open class MissingControllerException : KuzzleException(KuzzleExceptionCode.MISSING_CONTROLLER) |
6 changes: 6 additions & 0 deletions
6
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/MissingURLParamException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.kuzzle.sdk.coreClasses.exceptions | ||
|
||
/** | ||
* Thrown when attempting to interact with the network while not connected. | ||
*/ | ||
class MissingURLParamException(templateParam: String, baseURL: String) : KuzzleException("Missing URL Param $templateParam in $baseURL", 0) |
3 changes: 3 additions & 0 deletions
3
src/main/kotlin/io/kuzzle/sdk/coreClasses/exceptions/URLNotFoundException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package io.kuzzle.sdk.coreClasses.exceptions | ||
|
||
class URLNotFoundException(controller: String, action: String) : KuzzleException("No URL found for \"$controller:$action\".", 400) |
10 changes: 10 additions & 0 deletions
10
src/main/kotlin/io/kuzzle/sdk/coreClasses/http/HttpRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package io.kuzzle.sdk.coreClasses.http | ||
|
||
import io.kuzzle.sdk.coreClasses.maps.KuzzleMap | ||
|
||
data class HttpRequest( | ||
val verb: String, | ||
val url: String, | ||
val body: KuzzleMap?, | ||
val headers: KuzzleMap, | ||
) |
Oops, something went wrong.