Unable to get itemCategory info from call GetConfiguration when called from golang

前端 未结 1 566
小鲜肉
小鲜肉 2020-12-21 23:19

The api call

GET https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/257/getConfiguration?objectMask=mask[itemCategory]

returns an

1条回答
  •  忘掉有多难
    2020-12-22 00:12

    The default endpoint is REST but in your environment you are using xmlrpc, which is probably due to the existence of the ~ / .softlayer file and in this it is configured as an XMLRPC enpoint.

    For more information you can see the following documentation: https://github.com/softlayer/softlayer-go

    This issue happens for the XMLRPC enpoint and you can report it in the go GitHub. https://github.com/softlayer/softlayer-go/issues/

    Try in your code with the REST endpoint, like this example:

    endpoint := "https://api.softlayer.com/rest/v3"
    
    // Create a session
    sess := session.New(username, apikey, endpoint)
    

    0 讨论(0)
提交回复
热议问题