Quantcast
Channel: DreamFactory Forum - Latest posts
Viewing all articles
Browse latest Browse all 5027

Set headers explicitly?

$
0
0

Hi @m_menon,

Its ok and useful in some cases, but, if you create a service inside DF and need to call this service, you dont need to set headers and also dont need use your full URL. Just call like this:

result = platform.api.post("my_service_name", {"name":"test"});

The content type in your header, tells what you are sending and not what you will receive. Maybe your "http://example.com/my_api" doesn't set the content-type, so the content_type is set to null by DF.


Viewing all articles
Browse latest Browse all 5027

Trending Articles