Custom headers with DirectMethod

  1. #1

    Custom headers with DirectMethod

    As per title, is there a way to submit custom headers with a DirectMethod call?
  2. #2
    Hello @ampathdev!

    You can pass custom request headers by calling the direct method with a config object containing a requests member. If your direct method has parameters, the config object should be placed after the last direct method parameter.

    Example:

    App.direct.MyDirectMethod(myActualArgument, {
      headers: {
        'X-Custom-Header': 'Custom header value.'
      }
    });
    Hope this helps!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. DirectMethod in Custom Server Control
    By Piyey in forum 1.x Help
    Replies: 1
    Last Post: Aug 22, 2016, 11:38 PM
  2. [CLOSED] Return value custom property with DirectMethod
    By multimediait in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 09, 2014, 3:50 PM
  3. [CLOSED] Load Mask custom message for Ext.net.DirectMethod.request
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Sep 11, 2013, 12:53 PM
  4. [CLOSED] [1.0]Problem with directMethod from custom Combobox
    By capecod in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 29, 2010, 12:52 PM
  5. [CLOSED] Problem with dragging custom grid headers (0.8.3)
    By vedagopal2004 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 01, 2010, 1:37 PM

Tags for this Thread

Posting Permissions