Forum Stats

  • 3,827,561 Users
  • 2,260,792 Discussions
  • 7,897,297 Comments

Discussions

MAKE_REST_REQUEST_B utf-8 request

Edgar S.
Edgar S. Member Posts: 14 Red Ribbon

Hi,

How I can make request using MAKE_REST_REQUEST_B function with utf-8 character encoding? I have to call URL with encoded Lithuanian symbols (Pl%BFvel%BFs%20supjovimas; org. Plėvelės supjovimas).

I have tried set headers, but isn't working.

APEX_WEB_SERVICE.G_REQUEST_HEADERS(1).NAME  := 'Accept-Language';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(1).VALUE := 'lt';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(2).NAME := 'Accept-Charset';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(2).VALUE := 'utf-8';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(3).name := 'encoding';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(3).value := 'utf-8';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(4).name := 'Accept';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(4).value := 'application/pdf; charset=utf-8';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(5).name := 'Content-Type';
APEX_WEB_SERVICE.G_REQUEST_HEADERS(5).value := 'application/pdf; charset=utf-8';

I need something like

UTL_HTTP.SET_BODY_CHARSET('UTF-8');

because solution with UTL_HTTP package is working correctly.

Tagged: