Skip to content

[DISCUSS]: Use luasocket lib instead of curl in "bin/apisix"  #2818

Description

@starsz

Hi, I advise using luasocket lib instead of curl in "bin/apisix".

Although, it's very convenient to get HTTP responses by using "io.open" and "curl".
But, I think it's not an elegant way and has some limitations. Such as can't distinguish error info between Connection refused and empty response.

So I think we can use luasocket lib and create a common function in "cli/util.lua", so that we can deal with some HTTP request better in "bin/apisix".

releated: #2718

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions