本文整理匯總了Golang中github.com/Azure/go-autorest/autorest.AsHead函數的典型用法代碼示例。如果您正苦於以下問題:Golang AsHead函數的具體用法?Golang AsHead怎麽用?Golang AsHead使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AsHead函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: CheckExistenceRequestPreparer
// Create a Preparer by which to prepare the CheckExistence request.
func (client ResourceGroupsClient) CheckExistenceRequestPreparer() autorest.Preparer {
return autorest.CreatePreparer(
autorest.AsJSON(),
autorest.AsHead(),
autorest.WithBaseURL(client.BaseUri),
autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}"))
}
示例2: CheckExistenceByIDPreparer
// CheckExistenceByIDPreparer prepares the CheckExistenceByID request.
func (client Client) CheckExistenceByIDPreparer(resourceID string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceId": resourceID,
}
queryParameters := map[string]interface{}{
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/{resourceId}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
示例3: CheckExistencePreparer
// CheckExistencePreparer prepares the CheckExistence request.
func (client GroupsClient) CheckExistencePreparer(resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
queryParameters := map[string]interface{}{
"api-version": client.APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
示例4: CheckExistencePreparer
// CheckExistencePreparer prepares the CheckExistence request.
func (client GroupsClient) CheckExistencePreparer(resourceGroupName string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": url.QueryEscape(resourceGroupName),
"subscriptionId": url.QueryEscape(client.SubscriptionID),
}
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}"),
autorest.WithPathParameters(pathParameters),
autorest.WithQueryParameters(queryParameters))
}
示例5: CheckExistencePreparer
// CheckExistencePreparer prepares the CheckExistence request.
func (client Client) CheckExistencePreparer(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, apiVersion string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"parentResourcePath": parentResourcePath,
"resourceGroupName": url.QueryEscape(resourceGroupName),
"resourceName": url.QueryEscape(resourceName),
"resourceProviderNamespace": url.QueryEscape(resourceProviderNamespace),
"resourceType": resourceType,
"subscriptionId": url.QueryEscape(client.SubscriptionID),
}
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
return autorest.Prepare(&http.Request{},
autorest.AsJSON(),
autorest.AsHead(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPath("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}"),
autorest.WithPathParameters(pathParameters),
autorest.WithQueryParameters(queryParameters))
}