{"id":24349226,"url":"https://github.com/abappm/abap-http-agent","last_synced_at":"2025-03-12T03:14:00.701Z","repository":{"id":271415466,"uuid":"898920834","full_name":"abapPM/ABAP-HTTP-Agent","owner":"abapPM","description":"Easy to Use HTTP Agent and Login Manager","archived":false,"fork":false,"pushed_at":"2025-01-30T18:28:31.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T09:47:38.776Z","etag":null,"topics":["abap","agent","apm","html"],"latest_commit_sha":null,"homepage":"https://abappm.com","language":"ABAP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abapPM.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mbtools"}},"created_at":"2024-12-05T09:38:43.000Z","updated_at":"2025-01-31T09:39:59.000Z","dependencies_parsed_at":"2025-01-07T19:35:37.985Z","dependency_job_id":"91837b89-4391-47bc-9246-957773399baf","html_url":"https://github.com/abapPM/ABAP-HTTP-Agent","commit_stats":null,"previous_names":["abappm/abap-http","abappm/abap-http-agent"],"tags_count":0,"template":false,"template_full_name":"abapPM/Template-for-ABAP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abapPM%2FABAP-HTTP-Agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abapPM%2FABAP-HTTP-Agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abapPM%2FABAP-HTTP-Agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abapPM%2FABAP-HTTP-Agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abapPM","download_url":"https://codeload.github.com/abapPM/ABAP-HTTP-Agent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243147103,"owners_count":20243746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abap","agent","apm","html"],"created_at":"2025-01-18T12:35:43.540Z","updated_at":"2025-03-12T03:14:00.694Z","avatar_url":"https://github.com/abapPM.png","language":"ABAP","readme":"![Version](https://img.shields.io/endpoint?url=https://shield.abappm.com/github/abapPM/ABAP-HTTP-Agent/src/zif_http_agent.intf.abap/c_version\u0026label=Version\u0026color=blue)\n\n[![License](https://img.shields.io/github/license/abapPM/ABAP-HTTP-Agent?label=License\u0026color=success)](https://github.com/abapPM/ABAP-HTTP-Agent/blob/main/LICENSE)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?color=success)](https://github.com/abapPM/.github/blob/main/CODE_OF_CONDUCT.md)\n[![REUSE Status](https://api.reuse.software/badge/github.com/abapPM/ABAP-HTTP-Agent)](https://api.reuse.software/info/github.com/abapPM/ABAP-HTTP-Agent)\n\n# HTTP Agent\n\nEasy to use HTTP agent and login manager with request/response handling.\n\nNO WARRANTIES, [MIT License](https://github.com/abapPM/ABAP-HTTP-Agent/blob/main/LICENSE)\n\n## Usage\n\nInitialize an HTTP agent and set header fields:\n\n```abap\nDATA(agent) = zcl_http_agent=\u003ecreate( ).\n\n\" Optionally set headers\nagent-\u003eglobal_headers( )-\u003eset(\n  iv_key = zif_http_agent=\u003ec_header-accept\n  iv_val = zif_http_agent=\u003ec_content_type-json ).\n\nagent-\u003eglobal_headers( )-\u003eset(\n  iv_key = zif_http_agent=\u003ec_header-content_type\n  iv_val = zif_http_agent=\u003ec_content_type-json ).\n\nagent-\u003eglobal_headers( )-\u003eset(\n  iv_key = zif_http_agent=\u003ec_header-user_agent\n  iv_val = `abap 7.5` ).\n```\n\nGet and set authorization tokens:\n\n```abap\nDATA(host) = 'api.github.com'.\n\nIF zcl_http_login_manager=\u003eget( host ) IS NOT INITIAL.\n  agent-\u003eglobal_headers( )-\u003eset(\n    iv_key = zif_http_agent=\u003ec_header-authorization\n    iv_val = zcl_http_login_manager=\u003eget( host ) ).\nENDIF.\n```\n\nGet request:\n\n```abap\nDATA(response) = agent-\u003erequest( url = 'https://api.github.com/emojis' ).\n\nIF response-\u003eis_ok( ) = abap_false.\n  message = |Error { response-\u003ecode( ) }|.\nENDIF.\n```\n\nPut request with payload:\n\n```abap\nDATA(response) = agent-\u003erequest(\n  url     = 'https://myserver.com/'\n  method  = zif_abappm_http_agent=\u003ec_method-put\n  payload = json ).\n\nIF response-\u003eis_ok( ) = abap_false.\n  message = |Error { response-\u003ecode( ) }|.\nENDIF.\n```\n\n## Prerequisites\n\nSAP Basis 7.50 or higher\n\n## Installation\n\nInstall `http-agent` as a global module in your system using [apm](https://abappm.com).\n\nor\n\nSpecify the `http-agent` module as a dependency in your project and import it to your namespace using [apm](https://abappm.com).\n\n## Contributions\n\nAll contributions are welcome! Read our [Contribution Guidelines](https://github.com/abapPM/ABAP-HTTP-Agent/blob/main/CONTRIBUTING.md), fork this repo, and create a pull request.\n\nYou can install the developer version of ABAP HTTP Agent using [abapGit](https://github.com/abapGit/abapGit) either by creating a new online repository for `https://github.com/abapPM/ABAP-HTTP-Agent`.\n\nRecommended SAP package: `$HTTP-AGENT`\n\n## About\n\nMade with ❤ in Canada\n\nCopyright 2025 apm.to Inc. \u003chttps://apm.to\u003e\n\nFollow [@marcf.be](https://bsky.app/profile/marcf.be) on Blueksy and [@marcfbe](https://linkedin.com/in/marcfbe) or LinkedIn\n","funding_links":["https://github.com/sponsors/mbtools"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabappm%2Fabap-http-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabappm%2Fabap-http-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabappm%2Fabap-http-agent/lists"}