Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

251
Views
How to see non-body returns?

I'm using Postman to test Azure Function. For this code

context.res = {status: 200, body: "ok", txt: "hello"};

txt is nowhere to be seen. Anyway to check it or have to wrap it under body? enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

According to Azure Functions JavaScript developer guide the response doesn't contain the object you've specified:

The context.res (response) object has the following properties:

Property Description
body An object that contains the body of the response.
headers An object that contains the response headers.
isRaw Indicates that formatting is skipped for the response.
status The HTTP status code of the response.
cookies An array of HTTP cookie objects that are set in the response. An >HTTP cookie object has a name, value, and other cookie properties, such as >maxAge or sameSite.

I assume the property txt is not serialized to the response so I don't think you could access it from postman or other any other client.

If you want to return some data you should add it to the body:

context.res = {
    status: 200, 
    body: {
        "message": "ok", 
        "txt": "hello"
    }
};
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!