20 lines
387 B
Go
20 lines
387 B
Go
package apiclient
|
|
|
|
const (
|
|
HeaderContentType = "Content-Type"
|
|
MIMEApplicationForm = "application/x-www-form-urlencoded"
|
|
ApplicationJson = "application/json"
|
|
)
|
|
|
|
type ApiClient struct {
|
|
Articles Articles
|
|
Users Users
|
|
}
|
|
|
|
func New(serverAddress string) ApiClient {
|
|
return ApiClient{
|
|
Articles: newArticleService(serverAddress),
|
|
Users: newUserService(serverAddress),
|
|
}
|
|
}
|