(Passthrough)
- Request - Make a passthrough request
Make a passthrough request
package main
import(
gosdk "github.com/panoratech/go-sdk"
"context"
"github.com/panoratech/go-sdk/models/components"
"log"
)
func main() {
s := gosdk.New(
gosdk.WithSecurity("<YOUR_API_KEY_HERE>"),
)
ctx := context.Background()
res, err := s.Passthrough.Request(ctx, "<value>", components.PassThroughRequestDto{
Method: components.PassThroughRequestDtoMethodGet,
Path: gosdk.String("/dev"),
Data: components.Data{},
RequestFormat: components.CreateRequestFormatMapOfAny(
map[string]any{
},
),
OverrideBaseURL: map[string]any{
"key": "https://equatorial-government.com/",
},
})
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. |
xConnectionToken |
string | ✔️ | N/A |
passThroughRequestDto |
components.PassThroughRequestDto | ✔️ | N/A |
opts |
[]operations.Option | ➖ | The options for this request. |
*operations.RequestResponse, error
Error Type | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4XX, 5XX | */* |