Skip to Content
-2

How to execute curl command in abap ?

Jan 22 at 12:22 AM

207

avatar image
Former Member

Dear.

As we need to implement 3rd party http API, their specification is fit with curl command.

curl -X POST --data "action=send" --data "data=<PAYLOAD>" http://www.mgage.solutions/servxml/XML_parse_API.php


Is there any way to call curl command in abap ?

and any other things to install in application server like HTTP_APP ?

Would you guide me how to call curl command from A to Z in detail ?

Best Regards,

SJ.

10 |10000 characters needed characters left characters exceeded

Do you know that you can execute HTTP requests from ABAP? The answers are in the web.

0
Former Member
Sandra Rossi

HI, Rossi.

Would you post URL describing on how to execute HTTP request from ABAP ?

Regards,

SJ

0

I meant "search yourself, the answers are in the web"

0
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Domi Bigl Jan 22 at 07:23 AM
2

Hi

The WAS has an integrated HTTP server and client - you can use this to do the HTTP POST

Creating the HTTP Client

regards

Domi

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Dear. Domi.

Yes, http connection was first thing we try. But there's limitation to call solution API.

API does not support POST method putting value in header side.

That's why 3rd party API suggests to use curl and we struggles to find how to call it on ABAP.

Regards,

SJ.

0

Hi

then put it in the body - eg as form data

regards

Domi

0
Former Member
Domi Bigl

Hi.

both body or header, it's not working.

Their API are not ready to get data in header and body.

It's just query string method, but it occurs 414 error when having long parameter value.

So need to implement it with curl.

Regards,

SJ.

0

HTTP 414 is "Request URI too long", so it seems that you passed the payload both through the body and through the URI. Why??? Pass the payload either in the URI or in the body, not in both!

That's not really an ABAP question by the way.

0

Hi

If you get an 414 from the server, how shoult this work with curl? If the "payload" is too large it won't work in curl either!?

regard

Domi

0