Created
November 14, 2022 15:42
-
-
Save fleischr/8648de68981f44603853c76bf105c5ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
report zwritebinaryfiletohttp. | |
part = client->request->add_multipart( ). | |
CALL METHOD part->set_header_field | |
EXPORTING | |
name = 'content-disposition' | |
value = 'form-data;name="file"; filename="file.bin";'. | |
CALL METHOD part->set_header_field | |
EXPORTING | |
name = 'content-type' | |
value = 'bin'. | |
OPEN DATASET '/file.bin FOR INPUT IN BINARY MODE. | |
read dataset '/file.bin' into data. | |
len = xstrlen( data ). | |
CALL METHOD part->set_data | |
EXPORTING | |
data = data | |
offset = 0 | |
length = len. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment