Skip to content
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

send-http-request added #70

Closed
wants to merge 2 commits into from
Closed

send-http-request added #70

wants to merge 2 commits into from

Conversation

SanjayDevTech
Copy link

Fixes: appwrite/appwrite#4181

  • Implemented function sendHTTPRequest() in kotlin/ folder.
  • Manually executed the newly implemented function to ensure it works using openruntime docker image.

@abnegate
Copy link
Member

@SanjayDevTech Thanks for the PR 🤯 Please give us some time to review it 🙏

@Meldiron
Copy link
Contributor

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! 🎃

@stnguyen90 stnguyen90 self-requested a review November 1, 2022 22:17
Copy link
Contributor

@stnguyen90 stnguyen90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! 🤯 We left some comments during the review, please check them out.

Would you also please add a README like https://github.com/open-runtimes/examples/blob/1ec5fc25cd5ec71615d44b4ae33214e1d320d25b/kotlin/deepgram-transcribe-audio/README.md?

method = json["method"].toString(),
url = json["url"].toString(),
headers = headers,
body = if (json["method"].toString() != "GET") json["body"].toString() else null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried testing with:

{"headers": {"Content-Type": "application/json"},"url": "https://jsonplaceholder.typicode.com/posts", "method": "POST", "body": "{\"title\": \"foo\"}"}

and

{"headers": {"Content-Type": "application/json"},"url": "https://jsonplaceholder.typicode.com/posts", "method": "POST", "body": {"title": "foo"}}

but I'm getting the following error:

{"success":false,"message":"JSON payload parsing error: com.google.gson.stream.MalformedJsonException: Unterminated object at line 1 column 27 path $."}

Any idea what could be wrong?

@Meldiron
Copy link
Contributor

Hey there 👋
We are temporarily closing your PR as there has been no activity on it. Feel free to re-open it when you're ready to start working on it again 😇

@Meldiron Meldiron closed this Jan 22, 2023
@SanjayDevTech
Copy link
Author

@stnguyen90 Just want to know how to test the functions immediately after the code change?

@SanjayDevTech
Copy link
Author

@Meldiron Can you re-open this pr. I can't see any option to reopen. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

⚡ Write a sendHTTPRequest() Function using Kotlin
4 participants