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

feat(scripting/lua): add PerformHttpRequestAwait #2715

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

someone005
Copy link
Contributor

Goal of this PR

Let developers write less code if they want to fetch data by using PerformHttpRequest native

How is this PR achieving the goal

Now developers have to use promises to await for data got from

This PR applies to the following area(s)

ScRT: lua

Successfully tested on

Game builds: 3095

Platforms: Windows, Linux

Checklist

  • [ x ] Code compiles and has been tested successfully.
  • [ x ] Code explains itself well and/or is documented.
  • [ x ] My commit message explains what the changes do and what they are for.
  • [ x ] No extra compilation warnings are added by these changes.

@github-actions github-actions bot added the triage Needs a preliminary assessment to determine the urgency and required action label Aug 16, 2024
@FabianTerhorst FabianTerhorst self-assigned this Aug 16, 2024
@FabianTerhorst FabianTerhorst self-requested a review August 16, 2024 11:59
@FabianTerhorst FabianTerhorst removed the triage Needs a preliminary assessment to determine the urgency and required action label Aug 16, 2024
Copy link
Contributor

@FabianTerhorst FabianTerhorst left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, works fine 👍

local errorCode, resultData, resultHeaders, errorData = PerformHttpRequestAwait("https://www.rockstargames.com/")

@FabianTerhorst FabianTerhorst added the ready-to-merge This PR is enqueued for merging label Aug 16, 2024
@prikolium-cfx prikolium-cfx merged commit 8c2581e into citizenfx:master Aug 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants