-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
483f28f
commit 7fc2c62
Showing
3 changed files
with
62 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
package apiclient | ||
|
||
import ( | ||
"net/http" | ||
"net/url" | ||
) | ||
|
||
type HTTP interface { | ||
Do(req *http.Request) (resp *http.Response, err error) | ||
Get(url string) (resp *http.Response, err error) | ||
PostForm(url string, data url.Values) (resp *http.Response, err error) | ||
} | ||
|
||
type APIClient struct { | ||
BaseURL string | ||
AuthToken string | ||
HTTP HTTP | ||
} |