RESTFUL API Header variable ?


  • Hi - i have RESTFUL API services.
    How to know that all requests to customer are passing the Header variable  “Accept-Version”  with value = 1  ??

    I have this below set in my WCF-HTTP Transport Properties :
    under Messages tab -> 

    Accept: application/xml; version=0.3Accept-Version: 1
                          Accept: application/xml; version=0.1Accept-Version: 1
                          Accept: */*; version=0.1Accept-Version: 1Content-Type: multipart/form-data; boundary="----=_Part_1"MIME-Version: 1.0
                          Accept: application/xml; version=0.1Accept-Version: 1

    Is the above confirms that Accept-Version = 1 is already set ? Where are Header variables defined here ?


    Friday, June 30, 2017 3:05 PM

All replies

  • Are you sending or receiving these requests?

    And, why are you even trying to do this?

    Finally, the sample is poorly formatted, it's actually invalid.  Can you correct that?  It's hard to tell what you may be referring to.

    Friday, June 30, 2017 5:14 PM
  • We are sending to them. I am not trying, that is the way it is set in WCFWeb-HTTP adapter under Messages tab. Just wanted to confirm is that the Header variable set as Accept-Version = 1 in the above ? Iam kinda new to Rest API, so just checking where Header variable is defined ?


    Friday, June 30, 2017 5:28 PM
  • So, in that case, the question becomes, is this causing problem?  Have you tried and they rejected?

    If so, that's really a different question.

    If they accept it, then, well, it doesn't matter.

    Friday, June 30, 2017 5:33 PM
  • Again there is no issue, someone aaked me what is the Header variable given ? and make sure that Aceept-Version = 1. So wanted to confirm with above expeession I posted is correct or I need to check Header variable somewhere else ?


    Friday, June 30, 2017 5:46 PM
  • To remind, the sample is malformed so it's difficult to tell what header belongs where.

    Friday, June 30, 2017 7:13 PM