REST METHOD Question
 

REST METHOD Question

4 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    25 May 2023
    Link to this post
    We have METHOD defined in our BE as what is below.


    @RestMethod (address="/Item/~{UpcNum}/~{PackNum}/GetVendorProductItem", requestMethod="get", parameterClassName="Osprey.Pos.Item.ItemParameter", response="poItemParameter").
    METHOD PUBLIC VOID GetVendorProductItem ( INPUT-OUTPUT DATASET-HANDLE phDset, poItemParameter AS Osprey.Pos.Item.ItemParameter  ):

    If we use the following url the second parameter always comes over as null. If we only send one parameter (either one) the value will come over correctly. Can we send multiple parameters like this in a REST call?

    http://192.168.168.68:8940/OspreyHostBackend/web/Entities/Item/:UpcNum/:PackNum/GetVendorProductItem?VendorNum=1000&IsReceiving=true
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    25 May 2023 in reply to Roger Blanchard
    Link to this post
    The colons in the URL look suspicious. Have you tried encoding them as %3A ?
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    25 May 2023 in reply to Mike Fechner
    Link to this post
    This URL is directly from PostMan but we can try that.
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    25 May 2023 in reply to Roger Blanchard
    Link to this post
    The colons are not passed to the backend when using Postman.

    We found the issue...there was a space at the end of the url so "true" was actually "true "

    Thanks for responding
4 posts, 1 answered