Web Connection
wwJsonSerializer
Gravatar is a globally recognized avatar based on your email address. wwJsonSerializer
  n/a
  All
  Mar 20, 2015 @ 12:48pm
Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!

thanks to all

Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  Rick Strahl
  andy
  Mar 20, 2015 @ 03:31pm

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  n/a
  Rick Strahl
  Mar 23, 2015 @ 07:10am
It looks like .AppendHeader() got added to the Response class in v 5.1? We're on the upgrade path, but we'll have to overcome some creative hacks that had been made to the WWWC framework classes! But we're trying a POC that our WC app can return usable JSON. Is there a quick alternative for AppendHeader() in v 5.0.31 please? Thanks--

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!



Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  Rick Strahl
  andy
  Mar 23, 2015 @ 09:50am

Response.AppendHeader() is just a shortcut for Response.Headers.Add().

+++ Rick ---



It looks like .AppendHeader() got added to the Response class in v 5.1? We're on the upgrade path, but we'll have to overcome some creative hacks that had been made to the WWWC framework classes! But we're trying a POC that our WC app can return usable JSON. Is there a quick alternative for AppendHeader() in v 5.0.31 please? Thanks--

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!






Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  n/a
  Rick Strahl
  Mar 24, 2015 @ 02:09am
Yea, our particular wwResponse class doesn't have an integral collection of Headers. I didn't even see any framework code that hooks one to it either. Have I inherited a hacked version of WWWC?

Response.AppendHeader() is just a shortcut for Response.Headers.Add().

+++ Rick ---



It looks like .AppendHeader() got added to the Response class in v 5.1? We're on the upgrade path, but we'll have to overcome some creative hacks that had been made to the WWWC framework classes! But we're trying a POC that our WC app can return usable JSON. Is there a quick alternative for AppendHeader() in v 5.0.31 please? Thanks--

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!






Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  Rick Strahl
  andy
  Mar 25, 2015 @ 02:04pm

You're not using the newer wwPageResponse class.

Switch to that in your Process class header:

cResponseClass = "wwPageResponse" && or wwPageResponse40

+++ Rick ---



Yea, our particular wwResponse class doesn't have an integral collection of Headers. I didn't even see any framework code that hooks one to it either. Have I inherited a hacked version of WWWC?

Response.AppendHeader() is just a shortcut for Response.Headers.Add().

+++ Rick ---



It looks like .AppendHeader() got added to the Response class in v 5.1? We're on the upgrade path, but we'll have to overcome some creative hacks that had been made to the WWWC framework classes! But we're trying a POC that our WC app can return usable JSON. Is there a quick alternative for AppendHeader() in v 5.0.31 please? Thanks--

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!









Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: wwJsonSerializer
  n/a
  Rick Strahl
  Mar 26, 2015 @ 03:13am
That worked, thanks Rick--

You're not using the newer wwPageResponse class.

Switch to that in your Process class header:

cResponseClass = "wwPageResponse" && or wwPageResponse40

+++ Rick ---



Yea, our particular wwResponse class doesn't have an integral collection of Headers. I didn't even see any framework code that hooks one to it either. Have I inherited a hacked version of WWWC?

Response.AppendHeader() is just a shortcut for Response.Headers.Add().

+++ Rick ---



It looks like .AppendHeader() got added to the Response class in v 5.1? We're on the upgrade path, but we'll have to overcome some creative hacks that had been made to the WWWC framework classes! But we're trying a POC that our WC app can return usable JSON. Is there a quick alternative for AppendHeader() in v 5.0.31 please? Thanks--

This is not part of serialized output, that's an Http header.

And yes you can add that by doing:


Response.AppendHeader("Access-Control-Allow-Origin","*")

In your process method code.

+++ Rick



Is there a way for serialized output from the class to include "Access-Control-Allow-Origin: *"?

Thanks for any help!









© 1996-2024