mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender-pwa.git
synced 2025-08-14 15:43:52 +02:00
feat:#36 added protobuf communication for modules
This commit is contained in:
@@ -6,9 +6,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const host = "http://htwkalender-data-manager:8090"
|
||||
|
||||
func RequestApi(path string) (*client.Response, error) {
|
||||
func RequestApi(host string, path string) (*client.Response, error) {
|
||||
|
||||
cc := client.New()
|
||||
cc.SetTimeout(5 * time.Second)
|
||||
@@ -22,7 +20,7 @@ func RequestApi(path string) (*client.Response, error) {
|
||||
return response, nil
|
||||
}
|
||||
|
||||
func DeleteRequestApi(path string) error {
|
||||
func DeleteRequestApi(host string, path string) error {
|
||||
|
||||
cc := client.New()
|
||||
cc.SetTimeout(5 * time.Second)
|
||||
@@ -36,7 +34,7 @@ func DeleteRequestApi(path string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func PostRequestApi(path string, body []model.FeedCollection) (*client.Response, error) {
|
||||
func PostRequestApi(host string, path string, body []model.FeedCollection) (*client.Response, error) {
|
||||
|
||||
cc := client.New()
|
||||
cc.SetTimeout(5 * time.Second)
|
||||
|
Reference in New Issue
Block a user