Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: HTTP POST fail when URL contains Unicode characters

  1. #1
    Join Date
    Nov 2015
    Posts
    4

    Default HTTP POST fail when URL contains Unicode characters

    I have a problem with the “HTTP POST” step. The example URL is /jobs/{job_shortname}/execute. The HTTP post step fail with "escaped absolute path not valid" when the URL contains Unicode characters, like http://10.105.17.101:8180/dm-rest-se...工作/execute. The service went well when calling it from firefox RESTClient.

    Below is the two steps in my transformation,
    Modified Java Script:
    var url = "http://10.105.17.101:8180/dm-rest-services/api/jobs/工作/execute";
    var type ="application/json";
    var auth ="Basic cm9vdDpyb290MTIzNEA=";

    HTTP POST:
    General tab
    select Accept the URL from the field -> checked
    URL field name ->url
    encoding -> UTF-8
    Request entity field ->empty
    Result field name -> result
    HTTP status code field ->status code

    Fields tab
    Body (Header) parameters
    Name|Parameter|put in header
    type|Content-Type|Y
    auth|Authorization|Y

    Thanks in advance!
    Yan

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    HTTP-Post expects the uri to be encoded - unlike Firefox.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Nov 2015
    Posts
    4

    Default

    Thanks Marabu! I encoded it with encodeURI(url_1) function. It works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.