New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help with a strange API #13
Comments
Then you would use fn create_comment_by_url(&self, link: &str, subject: &str, content: &str) -> RawResponse {
POST("{}", link);
fields! {
"ws.op" => "createComment",
"subject" => subject,
"content" => content
}
} and then the response containing the headers is within. If you have a type to decode and you also want to inspect the response, you can use |
However, if you want to abstract over this within the service definition alone, I don't really have anything for that yet. I've been conceptualizing a sort of |
Thanks for your comments, that is really helpful. An example would have helped in the code base, since the I take your last comment that you mean that a wrapper class to abstract the service a bit more idiomatic is required to hide the |
The goal is to be able to abstract a lot of the weirdness inside the service definition but I'm not completely sure how I want to do that. |
I am trying to wrap
createComment
from the LaunchPad API - search forcreateComment
on the page as the method has no direct link.This looks like this in my code:
With
link
being amerge_proposal.self_link
.This does work, however the API states:
I would like to expose this returned link in my API wrapper, but found no way of extracting a header from the response. Could you give me a hint?
The text was updated successfully, but these errors were encountered: