mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Merge pull request #1737 from larshp/patch-1
Playground: add ABAP sample
This commit is contained in:
commit
592f026771
1 changed files with 29 additions and 0 deletions
29
website/index/samples/sample.abap.txt
Normal file
29
website/index/samples/sample.abap.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
REPORT zrosetta_base64_encode_data.
|
||||
|
||||
DATA: li_client TYPE REF TO if_http_client,
|
||||
lv_encoded TYPE string,
|
||||
lv_data TYPE xstring.
|
||||
|
||||
|
||||
cl_http_client=>create_by_url(
|
||||
EXPORTING
|
||||
url = 'http://rosettacode.org/favicon.ico'
|
||||
IMPORTING
|
||||
client = li_client ).
|
||||
|
||||
li_client->send( ).
|
||||
li_client->receive( ).
|
||||
|
||||
lv_data = li_client->response->get_data( ).
|
||||
|
||||
CALL FUNCTION 'SSFC_BASE64_ENCODE'
|
||||
EXPORTING
|
||||
bindata = lv_data
|
||||
IMPORTING
|
||||
b64data = lv_encoded.
|
||||
|
||||
WHILE strlen( lv_encoded ) > 100.
|
||||
WRITE: / lv_encoded(100).
|
||||
lv_encoded = lv_encoded+100.
|
||||
ENDWHILE.
|
||||
WRITE: / lv_encoded.
|
||||
Loading…
Add table
Add a link
Reference in a new issue