Open Octogonapus opened 6 months ago
I believe it is here that the request is built: https://github.com/JuliaCloud/AWS.jl/blob/5ebf8caa636dc8f2d051aea70a69adc7d146cad4/src/AWS.jl#L402. For a json service I think all the args are passed in the body as opposed to as a queryparam.
IIUC AWS.jl autogenerates the definitions from XML files so maybe we need to add support for some JSON services having some arguments as query parameters.
maybe @mattBrzezinski could say more
We generate based off of aws-sdk-js JSON definitions, here's where we look at the GetThingShadowRequest, it looks like this does specify the queryparam so it should be going into the correct position?
To quickly unblock yourself, I think you could do something like...
function getShadowThing(thingName, shadowName; awsConfig=global_aws_config())
return AWS.iot_data_plane("GET", "things/${thingName}/shadow?name=${shadowName}"; aws_config=aws_config)
end
Basically just write the "low-level" request yourself and send that over
That's a helpful pointer. What I'm getting at though is we don't have querystring
location in the generation code, AFIACT. E.g. if I search for querystring
I don't find anything, location
just finds these two:
So I think the generation code has be updated to handle the querystring
location, as well as the RestJSONService
code to actually use it.
Does that seem accurate?
That's a helpful pointer. What I'm getting at though is we don't have
querystring
location in the generation code, AFIACT. E.g. if I search forquerystring
I don't find anything,location
just finds these two:So I think the generation code has be updated to handle the
querystring
location, as well as theRestJSONService
code to actually use it.Does that seem accurate?
Aha! I thought we already had this, but I guess not. This is how we would fix it in that case, do a similar filter()
call on locations for querystring
and do something like,
querystring_params = "?" * join(params, "&")
And append that to the URL
My code:
Throws this error:
According to the AWS documentation and the AWS.jl documentation the
?name=shadowName
parameter should be included, but is not as we can see in that HTTP error.AWS.jl v1.90.4
I can work on fixing this but I am not sure where to look in the parameter handling code.