Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
CreateHTTP3 | POST /service/{service_id}/version/{version_id}/http3 |
Enable support for HTTP/3 |
DeleteHTTP3 | DELETE /service/{service_id}/version/{version_id}/http3 |
Disable support for HTTP/3 |
GetHTTP3 | GET /service/{service_id}/version/{version_id}/http3 |
Get HTTP/3 status |
Enable support for HTTP/3
package main
import (
"context"
"fmt"
"os"
"time"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
versionID := int32(56) // int32 | Integer identifying a service version.
serviceID2 := "serviceId_example" // string | (optional)
version := int32(56) // int32 | (optional)
createdAt := time.Now() // time.Time | Date and time in ISO 8601 format. (optional)
deletedAt := time.Now() // time.Time | Date and time in ISO 8601 format. (optional)
updatedAt := time.Now() // time.Time | Date and time in ISO 8601 format. (optional)
featureRevision := int32(56) // int32 | Revision number of the HTTP/3 feature implementation. Defaults to the most recent revision. (optional)
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.HTTP3API.CreateHTTP3(ctx, serviceID, versionID).ServiceID2(serviceID2).Version(version).CreatedAt(createdAt).DeletedAt(deletedAt).UpdatedAt(updatedAt).FeatureRevision(featureRevision).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HTTP3API.CreateHTTP3`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateHTTP3`: HTTP3
fmt.Fprintf(os.Stdout, "Response from `HTTP3API.CreateHTTP3`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
versionID | int32 | Integer identifying a service version. |
Other parameters are passed through a pointer to a apiCreateHTTP3Request struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
serviceID2 | string | version |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Back to top | Back to API list | Back to README
Disable support for HTTP/3
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
versionID := int32(56) // int32 | Integer identifying a service version.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.HTTP3API.DeleteHTTP3(ctx, serviceID, versionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HTTP3API.DeleteHTTP3`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteHTTP3`: InlineResponse200
fmt.Fprintf(os.Stdout, "Response from `HTTP3API.DeleteHTTP3`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
versionID | int32 | Integer identifying a service version. |
Other parameters are passed through a pointer to a apiDeleteHTTP3Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
Back to top | Back to API list | Back to README
Get HTTP/3 status
package main
import (
"context"
"fmt"
"os"
"github.com/fastly/fastly-go/fastly"
)
func main() {
serviceID := "serviceId_example" // string | Alphanumeric string identifying the service.
versionID := int32(56) // int32 | Integer identifying a service version.
cfg := fastly.NewConfiguration()
apiClient := fastly.NewAPIClient(cfg)
ctx := fastly.NewAPIKeyContextFromEnv("FASTLY_API_TOKEN")
resp, r, err := apiClient.HTTP3API.GetHTTP3(ctx, serviceID, versionID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HTTP3API.GetHTTP3`: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHTTP3`: HTTP3
fmt.Fprintf(os.Stdout, "Response from `HTTP3API.GetHTTP3`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
serviceID | string | Alphanumeric string identifying the service. | |
versionID | int32 | Integer identifying a service version. |
Other parameters are passed through a pointer to a apiGetHTTP3Request struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json