-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Leverage the management client to make api requests in api cmd
- Loading branch information
Showing
3 changed files
with
39 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package auth0 | ||
|
||
import ( | ||
"net/http" | ||
|
||
"github.com/auth0/go-auth0/management" | ||
) | ||
|
||
type HTTPClientAPI interface { | ||
// NewRequest returns a new HTTP request. | ||
// If the payload is not nil it will be encoded as JSON. | ||
NewRequest(method, uri string, payload interface{}, options ...management.RequestOption) (*http.Request, error) | ||
|
||
// Do triggers an HTTP request and returns an HTTP response, | ||
// handling any context cancellations or timeouts. | ||
Do(req *http.Request) (*http.Response, error) | ||
} |
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