on 10-17-2019 2:52 PM
Hi ,
I'm trying to consume a API REST from SAP . The web service request as header "efacturaAuthorizationToken" , with the capital letters between word.
I set the header as follows
lo_http_client->request->if_http_entity~set_header_fields(
VALUE #(
( name = 'efacturaAuthorizationToken'
value = 'XXXXXXXXXXXXXXXXXXXXXXXXXX' )
( name = 'Content-Type'
value = 'text/plain' ) ) ).
SAP get this value in lower letter
When I consume the service, the API's response return that this header's value was not send. The API get this value all in low letter. Is there some way where I can send the values with some letters in capital ?
Thank
The API that you are calling is not following the standards.
In this discussion in stackoverflow I found the following link to the RFC 7230 that states: "Each header field consists of a case-insensitive field name followed by a colon (":"),
https://tools.ietf.org/html/rfc7230#section-3.2
So the consumer should be able to handle a header in lowercase letters.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is not obligatory that the web service receives the http header in lowercase.
But as I wrote the web service client should be able to handle a http header if it send by the server in lowercase because http header field names are supposed to be case insensitive.
The SAP Gateway framework does however not offer you a means to send http header names in uppercase.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.