https://github.com/abappm/abap-url
URL Object for ABAP
https://github.com/abappm/abap-url
abap apm sap url
Last synced: 4 months ago
JSON representation
URL Object for ABAP
- Host: GitHub
- URL: https://github.com/abappm/abap-url
- Owner: abapPM
- License: mit
- Created: 2024-12-19T06:02:02.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-31T10:53:15.000Z (5 months ago)
- Last Synced: 2025-03-09T09:47:38.764Z (4 months ago)
- Topics: abap, apm, sap, url
- Language: ABAP
- Homepage: https://abappm.com
- Size: 79.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/abapPM/ABAP-URL/blob/main/LICENSE)
[](https://github.com/abapPM/.github/blob/main/CODE_OF_CONDUCT.md)
[](https://api.reuse.software/info/github.com/abapPM/ABAP-URL)# URL Object
Full implementation of WHATWG [URL Standard](https://url.spec.whatwg.org/).
NO WARRANTIES, [MIT License](https://github.com/abapPM/ABAP-URL/blob/main/LICENSE)
```
┌────────┬──┬──────────┬──────────┬─────────────────┬──────┬──────────┬─┬──────────────┬──────────┐
" https: // user : pass @ sub.example.com : 8080 /p/a/t/h ? query=string #hash "
│ scheme │ │ username │ password │ host │ port │ path │ | query │ fragment │
├────────┴──┴──────────┴──────────┴─────────────────┴──────┴──────────┴─┴──────────────┴──────────┤
│ url │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘
(All spaces in the "" line should be ignored. They are purely for formatting.)
```## Usage
Parse a URL into it's component:
```abap
DATA(url) = zcl_url=>parse( 'https://example.com/path?query#fragment' )." url->components-scheme = 'https'
" url->components-host = 'example.com'
" url->components-path = '/path'
" url->components-query = 'query'
" url->components-fragment = 'fragment'
```Serialize a URL from components:
```abap
DATA(components) = VALUE zcl_url=>ty_url_components(
scheme = 'https'
username = 'user'
password = 'pass'
host = 'example.com'
port = '8080'
path = '/path/to/resource'
query = 'key=value'
fragment = 'section' ).DATA(url_string) = zcl_url=>serialize( components ).
" url_string = 'https://user:[email protected]:8080/path/to/resource?key=value#section'
```## Prerequisites
SAP Basis 7.50 or higher
## Limitations
There's no support for punycode (should be a separate package).
## Installation
Install `url` as a global module in your system using [apm](https://abappm.com).
or
Specify the `url` module as a dependency in your project and import it to your namespace using [apm](https://abappm.com).
## Contributions
All contributions are welcome! Read our [Contribution Guidelines](https://github.com/abapPM/ABAP-URL/blob/main/CONTRIBUTING.md), fork this repo, and create a pull request.
You can install the developer version of ABAP URL using [abapGit](https://github.com/abapGit/abapGit) by creating a new online repository for `https://github.com/abapPM/ABAP-URL`.
Recommended SAP package: `$URL`
## About
Made with ❤ in Canada
Copyright 2025 apm.to Inc.
Follow [@marcf.be](https://bsky.app/profile/marcf.be) on Blueksy and [@marcfbe](https://linkedin.com/in/marcfbe) or LinkedIn