Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing POST request using content type of x-www-form-urlencoded #8

Open
AbdAlKarimBalousha opened this issue Aug 8, 2024 · 0 comments

Comments

@AbdAlKarimBalousha
Copy link

AbdAlKarimBalousha commented Aug 8, 2024

I have an API that contains a request that uses x-www-form-urlencoded as body data type .. i noticed that when i use set_body_data the client proxy automaticly set the content-type to json so that won't work .. so i had to remove the request body before the execute and use the mo_http_client to set the custom content type and set_form_fields but that also didn't work .. any ideas how to send POST request with x-www-form-urlencoded data using client_proxy ?

data(lo_request) = mo_http_client->request.

lo_request->set_content_type( 'application/x-www-form-urlencoded' ).

lo_request->set_form_fields( value #( ( name = 'grant_type' value = 'password' ) ) ).

mo_client_proxy->create_resource( zaf_if_types=>gcs_resource_names-pets
)->create_request( /iwbep/if_v4_rest_types=>gcs_http_method-post
)->execute()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant