Skip to main content
Question

x-www-form-urlencoded request body


Forum|alt.badge.img+5

Hi, 

I am trying to integrate IFS Cloud with another system to send data. To send the data first I need to get the access token. For this i am using x-www-form-urlencoded in postman and it works as expected and retrieves the access token correctly. 

 

But if try this as a key value pair, am always getting an error. (Same if i try this from IFS as well).

 

Am I missing anything here?

 

Any help would be appreciated.

Thanks!

PhillBronson
Hero (Customer)
Forum|alt.badge.img+11

Try adding IEEE754Compatible=true



 


Forum|alt.badge.img+5
  • Do Gooder (Partner)
  • June 19, 2025

@PhillBronson i tried adding  IEEE754Compatible=true, but still it doesn't work and am receiving the same error.


Thirunavukkarasu Kapilan
Hero (Partner)
Forum|alt.badge.img+10

@Inisrinip 

I asked chatgtp to ask is there any way to convert the string to a expected x-www-form-urlencoded formet via plsql function and here is the result.

 

To convert a string or key-value pairs into x-www-form-urlencoded format in PL/SQL, you'll need to manually encode the characters, as Oracle doesn't provide a built-in function for full URL encoding.
✅ Basic PL/SQL Function to Encode for x-www-form-urlencoded
Here’s a PL/SQL function that:
Encodes special characters (e.g., to +, & to %26, etc.)
Can be used to construct a form-urlencoded string.

plsqlCopyEditCREATE OR REPLACE FUNCTION url_encode(p_str IN VARCHAR2) RETURN VARCHAR2 IS
    v_encoded VARCHAR2(32767) := '';
    v_char    CHAR(1);
    v_code    NUMBER;
BEGIN
    FOR i IN 1 .. LENGTH(p_str) LOOP
        v_char := SUBSTR(p_str, i, 1);
        v_code := ASCII(v_char);
        
        -- Replace space with +
        IF v_char = ' ' THEN
            v_encoded := v_encoded || '+';
        
        -- Alphanumeric and safe characters remain unchanged
        ELSIF REGEXP_LIKE(v_char, '[A-Za-z0-9\-_.~]') THEN
            v_encoded := v_encoded || v_char;
        
        -- Everything else gets percent-encoded
        ELSE
            v_encoded := v_encoded || '%' || TO_CHAR(v_code, 'FM0X');
        END IF;
    END LOOP;
    
    RETURN v_encoded;
END url_encode;
/

✅ Example: Converting a Key-Value String
plsqlCopyEditDECLARE
    v_name    VARCHAR2(100) := 'John Doe';
    v_email   VARCHAR2(100) := 'john@example.com';
    v_output  VARCHAR2(4000);
BEGIN
    v_output := 'name=' || url_encode(v_name) || '&email=' || url_encode(v_email);
    DBMS_OUTPUT.PUT_LINE(v_output);
    -- Output: name=John+Doe&email=john%40example.com
END;
Notes:
This function handles standard percent-encoding according to application/x-www-form-urlencoded.
It leaves safe characters (letters, digits, -, _, ., ~) unencoded and replaces spaces with +.

May be this is something useful ? 


Forum|alt.badge.img+4

@Inisrinip  I’m curious, if this is working properly in x-www-form-urlencoded mode, and you are getting an access token, why do you need to do it some other way? In other words, you say you have a working solution, what is missing?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings