Skip to content

use generell url parser. #33

Description

@lublak

Currently the code uses the same regex multiple times:

func get_authorization_host() -> String:
	var matches = url_regex.search(authorization_url)
	if matches == null: return ""
	return matches.get_string(1)
	
func get_authorization_path() -> String:
	var matches = url_regex.search(authorization_url)
	if matches == null: return ""
	return matches.get_string(6)

a better solution could be a "URL" class.

just a quick note:

class Url {
  port
  host
  path
  ....
  new() {
  
  }

  static fromString(url string) {
     // use regex to fill props
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions