Skip to content

Latest commit

 

History

History
71 lines (54 loc) · 3.35 KB

README.md

File metadata and controls

71 lines (54 loc) · 3.35 KB

Passthrough

(Passthrough)

Overview

Available Operations

  • Request - Make a passthrough request

Request

Make a passthrough request

Example Usage

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
    }
}

Parameters

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.

Response

*operations.RequestResponse, error

Errors

Error Type Status Code Content Type
sdkerrors.SDKError 4XX, 5XX */*