examples icon indicating copy to clipboard operation
examples copied to clipboard

[feat] Add Example for Sending HTTP Requests with Ruby Runtime

Open sudiptog81 opened this issue 3 years ago • 3 comments

Sends a HTTP request. All configurations should are received as a payload. Supported options are method, url, body, and headers. Status code, response body, and response headers are returned. No function variables are necessary.

Closes https://github.com/appwrite/appwrite/issues/4178.

Successful Request:

image

Failed Request:

image

Invalid Payload:

image

sudiptog81 avatar Oct 04 '22 08:10 sudiptog81

Hey There, Thank you for this PR! However a few issues that could use resolving.

  1. Please resolve the merge conflict by merging main into your branch
  2. Could you return a status code and the body error instead of the entire exception? It makes error handling a lot simpler

I believe a status code is anyways returned in case of an exception, I have extended the message object in the response to include the one from the actual HTTP response in the latest commit.

sudiptog81 avatar Oct 17 '22 23:10 sudiptog81

image

sudiptog81 avatar Oct 18 '22 00:10 sudiptog81

Thank you so much for the PR 🤩. We're adding the hacktoberfest-accepted label to ensure this PR counts towards your Hacktoberfest contributions count. With that said, please stay active on this PR to address any comments once you receive a review. Happy Hacktoberfest! 🎃

Meldiron avatar Oct 31 '22 16:10 Meldiron

@sudiptog81 please resolve the conflicts

christyjacob4 avatar Dec 20 '22 22:12 christyjacob4

@sudiptog81 please resolve the conflicts

Resolved!

sudiptog81 avatar Dec 21 '22 01:12 sudiptog81

THANK YOU! All changes merged 🥳

Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord.  

You can accept the invite by visiting https://github.com/orgs/appwrite/invitation. By joining our team, you will officially be an Appwrite maintainer on GitHub.

You can change your membership visibility settings, so your new Appwrite team membership badge will show up on your personal GitHub profile.

Please feel free to look for more PRs you might be interested in helping with on our long list of Hacktoberfest friendly issues and help make Appwrite better :)

christyjacob4 avatar Jan 10 '23 14:01 christyjacob4